为什么在声明时执行Button参数“命令”?
我是Python新手,想用tkinter编写一个程序。为什么执行下面的Hello函数?据我所知,只有在按下按钮时才会执行回调?我很困惑.。
>>> def Hello(): print("Hi there!")>>> hi=Button(frame,text="Hello",command=Hello())Hi there!>>>
白板的微信
相关分类