更新时间:2023-02-22 15:41:03
将此添加到您的代码中 root.mainloop()
, 这是一个教程.
Add this to your code root.mainloop()
, Here's a tutorial.
回应您的评论
#Also note that `from <module> import *` is generally frowned upon
#since it can lead to namespace collisions. It's much better to only
#explicitly import the things you need.
from Tkinter import Tk, Label
root = Tk()
w = Label(root, text="Hello, world!")
w.pack()
root.mainloop()