F
flupke
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
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