模块“tkinter”没有属性“tkinter”?

2024-09-26 17:49:47 发布

您现在位置:Python中文网/ 问答频道 /正文

我用的是Python3,我有一个用Python2编写的程序,我用2to3命令转换成Python3。在

运行代码后发生错误:

AttributeError: module 'tkinter' has no attribute 'tkinter'
Traceback (most recent call last):    
  File "pacman.py", line 679, in <module>    
    args = readCommand( sys.argv[1:] ) # Get game components based on input    
  File "pacman.py", line 567, in readCommand    
    import graphicsDisplay    
  File "graphicsDisplay.py", line 15, in <module>    
    from graphicsUtils import *    
  File "graphicsUtils.py", line 294, in <module>    
    def keys_pressed(d_o_e=tkinter.tkinter.dooneevent,    
AttributeError: module 'tkinter' has no attribute 'tkinter'

Tags: noinpyimporttkinterlineattributepacman

热门问题