pygame.register_quit(callback) -> None The given callback routine will be called when. pygame is quitting. Quit callbacks are served on a 'last in, first out' basis. Also be aware that your callback may be called more than once..
pygame.init() -> (passed, failed) Initialize all imported pyGame modules. Including pyGame modules that are not part of the base modules (like font and image). It does not raise exceptions, but instead silently counts which modules have failed to init. The return argument contains a count of the number of modules initialized, and the number of modules that failed to initialize. You can always initialize the modules you want by hand. The modules that need it have an init() and quit() routine built in, which you can call directly. They also have a get_init() routine which you can use to doublecheck the initialization. Note that the manual init() routines will raise an exception on error. Be aware that most platforms require the display module to be initialized before others. This init() will handle that for you, but if you initialize by hand, be aware of this constraint. As with the manual init() routines. It is safe to call this init() as often as you like. If you have imported pyGame modules since the.
pygame.quit() -> none Uninitialize all pyGame modules that have been initialized. Even if you initialized the module by hand, this quit() will uninitialize it for you. All the pyGame modules are uninitialized automatically when your program exits, so you will usually not need this routine. If you program plans to keep running after it is done with pyGame, then would be a good time to make this call.
pygame.get_error() -> errorstring SDL maintains an internal current error message. This message is usually given to you when an SDL related exception occurs, but sometimes you may want to call this directly yourself.