timer problem
flupke
flupke at nonexistingdomain.com
Thu Aug 19 08:46:59 EDT 2004
I have a timer in a program but the function it is supposed
to call, is only executed once.
To simplify searching what i have done wrong, i've made a small
test app
================================
import threading
def command():
print "TIMER CALLED"
t = threading.Timer(2, command )
t.start()
s = raw_input()
t.cancel()
================================
Now, when i run it, it only prints TIMER CALLED once instead
of every 2 seconds.
What am i doing wrong? (Python 2.3.4 on Win2000)
Thanks,
Benedict
More information about the Python-list
mailing list