Pygame screen freezes when I close it
Question: The code loads up a pygame screen window, but when I click the X to close it,
it becomes unresponsive. I'm running on a 64-bit system, using a 32-bit python
and 32-bit pygame.

    
    
    from livewires import games, color
    
    games.init(screen_width = 640, screen_height = 480, fps = 50)
    
    games.screen.mainloop()
    


Answer: Mach1723's [answer](http://stackoverflow.com/questions/5615860/pygame-screen-
freezes-when-i-close-it/5616374#5616374) is correct, but I would like to
suggest another variant of a main loop:

    
    
    while 1:
        for event in pygame.event.get():
            if event.type == QUIT: ## defined in pygame.locals
                pygame.quit()
                sys.exit()
    
            if event.type == ## Handle other event types here...
    
        ## Do other important game loop stuff here.
    

