簡體   English   中英

我正在嘗試編寫代碼,但出現此錯誤

[英]I'm trying to write a code but i got this error

我試圖弄清楚它是什么問題。 代碼

from tkinter import *

compiler = tkinter()
editor = Text()
editor.pack()
compiler.mainloop()

錯誤

 compiler = tk()
NameError: name 'tk' is not defined```

寫 Tk() 而不是 tk() 它將起作用。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM