staying alive

Discussion in 'Python' started by rosen georgiev, Dec 24, 2004.

  1. 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

    -----------------------------------------------------------------
    SMS èçâåñòÿâàíå çà ïîëó÷åíî ïèñìî - http://promo.abv.bg/new_sms.html
    rosen georgiev, Dec 24, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael Scovetta
    Replies:
    0
    Views:
    3,093
    Michael Scovetta
    Jun 4, 2003
  2. tshad
    Replies:
    7
    Views:
    438
    tshad
    Jan 4, 2005
  3. Patio87
    Replies:
    4
    Views:
    414
    Julie
    Aug 18, 2004
  4. Irmen de Jong
    Replies:
    0
    Views:
    683
    Irmen de Jong
    Jun 25, 2003
  5. hisan
    Replies:
    1
    Views:
    1,312
    Dan Stromberg
    Jun 25, 2012
Loading...

Share This Page