python - Tkinter 工作吗?

标签 python python-3.x tkinter

我已经从以下位置安装了 Python 3.2:http://wiki.python.org/moin/TkInter .

第 3 步 - Tkinter 工作吗?

在 Python 提示符下尝试以下命令:

Tkinter._test() # note underscore in _test. Also, if you are using Python 3.1, try tkinter._test() instead. This should pop up a small window with two buttons.

>>> Tkinter._test
Traceback (most recent call last):
  File "<pyshell#4>", line 1, in <module>
    Tkinter._test
NameError: name 'Tkinter' is not defined

>>> tkinter._test
<function _test at 0x00000000028FD2C8>

但是,没有“带有 2 个按钮的窗口”。 想法?

最佳答案

运行 tkinter._test()。请注意括号。

关于python - Tkinter 工作吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5847152/

相关文章:

python - Numpy 切片多维错误产生意外结果

python - 当某个 channel 在 python 中上线时,如何获取 Youtube 视频 channel 的 URL?

python - 如何获取绑定(bind)键而不在输入框中输入

python - 添加多个条目并从中动态检索数据

python - 身份验证后使用 Python 请求下载 CSV 文件

python - 检查列表中任何元素的条件是否为 True(OR 运算)

python - 无法关闭 GUI 应用程序

python - 在 python 中一段时间​​后关闭 tkmessagebox

python - 无法腌制 <type 'cv2.BRISK' > : attribute lookup cv2. BRISK 失败

python - 如何在 pandas、python 上将多个 csv 文件合并到一个具有特定列的文件中?