摘要:
from tkinter import *class Application(Frame): def say_hi(self): print("hi there, everyone!") def createWidgets(self): self.QUIT = Label(self) self.QUIT["text"] = "请点击按钮记录工时..." self.QUIT["fg"] = "red" self.QUIT["bg"] = "white"# s 阅读全文
摘要:
9.8 sched 地址: http://docs.python.org/library/sched.html 可以做计划任务,就是在指定的延时之后执行一段程序。 sched.scheduler(timefunc, delayfunc) 接受两个参数, timefunc 必须在没有参数的情况下也能调用,返回延时数字(单位无所谓)。 delayfunc 接受一个参数,即为 timefunc 的返回值,并按照这个返回值进行延时。每当有一个 event 运行之后 delay 都会被以 0 为参数调用,这就允许在多线程程序中的其它进程有机会运行。 例子: # -*- coding: c... 阅读全文