[Tutor] Re: A couple of queries ...
Lee Harr
missive at hotmail.com
Mon Mar 15 19:33:32 EST 2004
>Is there a python equiverlant of BASH "sleep xm". Ie halt, go to sleep
>for x mins (Without resorting to a for loop with a v.large count,
>inaccurate + eats CPU cycles!) ?
>
import time
time.sleep(seconds)
>Second query. Is it possible for a python program to start up as a
>background process? The app I am writting needs a demon... (see query
>above :-) ) Rather than writting a seperate BASH script to call the
>python script with "proggy.pg &" in it. This would work but seems a bit
>awkward.
I think I would use twisted.
http://www.twistedmatrix.com/
http://www.onlamp.com/pub/a/python/2004/01/15/twisted_intro.html
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
More information about the Tutor
mailing list