timer

superpollo user at example.net
Mon Jun 29 23:54:33 CEST 2009


hi folks.

the follwing shoud print 'stuff' for 3 seconds and then stop. why it 
does not work? (prints stuff forever)

       1 #!/usr/bin/python
       2
       3 import threading
       4 import sys
       5
       6 t = threading.Timer(3.0, sys.exit)
       7 t.start()
       8 while True:
       9     print "stuff ",

bye



More information about the Python-list mailing list