python - why wont pygame quit? -


the game freezes instead of quitting. have exit idle. ideas on do?

def quit_game():     event in pygame.event.get():          if event.type == pygame.quit:              sys.exit() quit_game() 

this idle bug. recommend using real ide such pycharm. fix issue, have @ pygame faq. offer solution:

# ... running = true while running:     event = pygame.event.wait ()     if event.type == pygame.quit:         running = false  # idle friendly pygame.quit () 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -