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

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,351
    Michael Scovetta
    Jun 4, 2003
  2. tshad
    Replies:
    7
    Views:
    633
    tshad
    Jan 4, 2005
  3. Patio87
    Replies:
    4
    Views:
    517
    Julie
    Aug 18, 2004
  4. Peter Hansen
    Replies:
    1
    Views:
    794
    Amos Joshua
    Jun 29, 2003
  5. Jon Perez
    Replies:
    0
    Views:
    392
    Jon Perez
    Jun 6, 2004
  6. =?Utf-8?B?QWRhbQ==?=

    ASP.NET 2.0 - Sleeping connections staying open

    =?Utf-8?B?QWRhbQ==?=, Aug 15, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    729
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Aug 15, 2006
  7. Staying Motivated

    , Aug 24, 2008, in forum: C++
    Replies:
    5
    Views:
    423
  8. hisan
    Replies:
    1
    Views:
    2,423
    Dan Stromberg
    Jun 25, 2012
Loading...