看一看
threading.Timer。它在新线程中运行您的函数。
from threading import Timerdef hello(): print "hello, world"t = Timer(30.0, hello)t.start() # after 30 seconds, "hello, world" will be printed

看一看
threading.Timer。它在新线程中运行您的函数。
from threading import Timerdef hello(): print "hello, world"t = Timer(30.0, hello)t.start() # after 30 seconds, "hello, world" will be printed