Python 定时线程,延时线程

来源:互联网 发布:patch软件资源下载 编辑:程序博客网 时间:2024/05/17 23:40
import timeimport osimport threadingdef go():    os.system("notepad")timethread=threading.Timer(5,go) #延时线程,5秒以后执行go函数,执行一次,timethread.start()