[wingide-users] problems with threading.Timer
Sebastian Fey
sebastian.fey at web.de
Wed Nov 7 08:39:13 MST 2007
i got a program that uses the threading.Timer object.
when debugging with wing-ide the timer is only started once, whats the
problem?
###############
import threading
def test( v0, v1, v2 ):
print "test", v0, v1, v2
if v1 < 5:
print "run timers"
threading.Timer( 1, test, [], {"v0":v0+1,"v1":v1+1,"v2":v2+1}
).start()
if __name__ == "__main__":
print __name__
test(1,2,3)
###############
debug-I/O:
__main__
test 1 2 3
run timers
test 2 3 4
run timers
same script in win-shell:
__main__
test 1 2 3
run timers
test 2 3 4
run timers
test 3 4 5
run timers
test 4 5 6
More information about the wingide-users
mailing list