資源簡(jiǎn)介
Python GUI Tkinter 顯示時(shí)鐘方法
代碼片段和文件信息
#?-*-?coding:?UTF-8?-*-
#?Python?time?strptime()方法
#
import?systime
import?tkinter?as?Tkinter
def?trickit():
????currentTime=time.strftime(‘%Y-%m-%d?%H:%M:%S‘time.localtime(time.time()))
????Label1.config(text=currentTime)
????root.update()
????Label1.after(1000?trickit)
root=Tkinter.Tk()
root.title(“Show?CLO
評(píng)論
共有 條評(píng)論