staying alive

R

rosen georgiev

well, hello
i'm trying to write a script that listens for HAL messages (http://www.freedesktop.org/wiki/Software_2fhal) on D-BUS (http://www.freedesktop.org/wiki/Software_2fdbus).
the problem i have is to keep the script alive. the way i do it now is with a call to gtk.main() after all the init is done - and it works perfectly. but i can't start the app if X isn't running or as another user.
so with what should i replace gtk.main()!?
i tryed (i agree it's pretty dum :)
while 1:
time.sleep(1)
and it (surprice) does not work
i also tryed somethings with threads but with no luck.
in both cases the app is running but it does not reseive the messages - the handler functions do not get called

so, if anyone can help - please do :)
10Q
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top