Pyinstaller, NameError: global name 'quit' is not defined

后端 未结 3 495
不知归路
不知归路 2021-01-03 01:39

I have a python script which runs just fine, however after running pyinstaller, I get the following when I use a quit() or exit() command:

3条回答
  •  抹茶落季
    2021-01-03 01:42

    quit can be found in pygame.locals import *

    Usage:

    for event in pygame.event.get():
        if event.type == QUIT:
            pygame.quit()
            sys.exit()
    

提交回复
热议问题