我有以下python测试程序。当我运行它时,我希望能够点击"对话框"菜单并选择"显示对话框"并弹出对话框。相反,我得到:
<img>
正如你所知,这是在运行python 2.7的Mac上。
Exception in Tkinter callback
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1532, in __call__
return self.func(*args)
File "testdialogs.py", line 13, in dialog_show
result = tkSimpleDialog.askstring('Result', 'Where to next?')
AttributeError: 'module' object has no attribute 'askstring'