Some example code: Try: While running: .........pygame.update .....etc Pygame.quit Except exception: Pygame.quit() Raise That way even if it errors we still call pygame.quit(), which is what isn't happening since the idle doesn't call garbage collection on some code on error.
|