简体   繁体   English

我正在尝试编写代码,但出现此错误

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

I am trying to figure it out what problem is it.我试图弄清楚它是什么问题。 code代码

from tkinter import *

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

error错误

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

Write Tk() instead of tk() it will work.写 Tk() 而不是 tk() 它将起作用。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我在尝试安装 django 时收到错误代码 - I got the error code trying to install django 我正在尝试使用 python 编写一个 discord 机器人,但我没有收到机器人的回复:'( - I'm trying to write a discord bot using python but i got no responses from the bot :'( 我正在尝试用python写一个discord bot,但是我的代码不起作用 - I'm trying to write a discord bot in python but my code is not working 如何理解我正在尝试编写的 function 中的未定义错误 - How to understand an undefined error in a function I'm trying to write 我尝试在我的 Linux Mint 上安装 pyaudio 时出错 - I got an error while I'm trying to install pyaudio on my Linux Mint 我正在尝试运行我的注册站点,但在终端中出现错误 - I'm trying to get my registration site running but in the terminal I've got an error 我有一些代码没有做我想要的,但我没有收到错误消息 - I've got some code that isn't doing what I want but I'm not getting an error message 我正在尝试使用此 python 代码创建 wordcloud,但不断出现错误 - I'm trying to create a wordcloud with this python code, but keeps getting error 当我试图覆盖__plus__函数时,获得了不受支持的操作数错误 - Got a unsupported operand error when I'm trying to overwrite the __plus__ function 我正在尝试将涂成黑色的像素转换为另一种颜色,但我得到了一个错误 l - I m trying to convert the pixels which is painted black to another color but ı got an error l
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM