Was muss ich importieren, damit Python den Timer erkennt? Hab schon (fast) alles ausprobiert!
Code: Alles auswählen
def hello():
print "hello, world"
t = Timer(30.0, hello)
t.start() # after 30 seconds, "hello, world" will be printed
Code: Alles auswählen
def hello():
print "hello, world"
t = Timer(30.0, hello)
t.start() # after 30 seconds, "hello, world" will be printed
Code: Alles auswählen
import threading
def hello():
print "hello, world"
t = threading.Timer(30.0, hello)
t.start() # after 30 seconds, "hello, world" will be printed