关于Tkinter

it2022-05-09  23

1.AttributeError: module ‘tkinter’ has no attribute ‘TK’

import tkinter as tk app = tk.TK() app.title('FishC Demo') theLabel = tk.Label(app,text='The second windows application') theLabel.pack() app.mainloop()

这是我写的代码,报错,最后仔细查看发现,是我写“TK”是大写,而本身的属性是“Tk”。粗心。


最新回复(0)