之前做了一个小游戏项目(确认之前无报错),现在也是想再打开看看,结果程序退出部分没用了,具体报错(PyUnit检查)如下:
============================= ERRORS =============================
Traceback (most recent call last):
File "D:\Aptana\plugins\org.python.pydev_2.7.0.2013032300\pysrc\pydev_runfiles.py", line 432, in __get_module_from_str
mod = __import__(modname)
File "D:/Aptana Workspace/mygame/BF2042 LUCX\index.py", line 143, in <module>
handleEvent()
File "D:/Aptana Workspace/mygame/BF2042 LUCX\index.py", line 33, in handleEvent
sys.exit()
SystemExit
ERROR: Module: index could not be imported (file: D:\Aptana Workspace\mygame\BF2042 LUCX\index.py)
报错部分代码:
def handleEvent():
# 全局变量
global first_num, first_x, first_y,kill,timing
for event in pygame.event.get():
if event.type == pygame.QUIT or event.type == KEYDOWN and event.key == K_ESCAPE or timing>1:
sys.exit()
pygame.quit()
............
handleEvent()
在这段时间里,没动过任何代码
版本3.6.6
求解!(自己刚刚入门,也看不懂,有谁知道怎么解决吗)