Contains the core routines that are used by the rest of the
pygame modules. It's routines are merged directly into the pygame
namespace. This mainly includes the auto-initialization init() and
quit() routines.
There is a small module named 'locals' that also gets merged into
this namespace. This contains all the constants needed by pygame.
Object constructors also get placed into this namespace, you can
call functions like Rect() and Surface() to create objects of
that type. As a convenience, you can import the members of
pygame.locals directly into your module's namespace with 'from
pygame.locals import *'. Most of the pygame examples do this if
you'd like to take a look.
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.
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.