我已经从以下位置安装了 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/