[英]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.