Work Text3
Work Text3
locals
Learning Outcomes:
a. Understand pygame.locals
b. Familiarize the different pygame.locals
Pygame.locals –it is a module that contain constants that is used and defined by pygame.
Detailed descriptions of the various constants can be found throughout the pygame documentation. Here
are the locations of some of them.
1. The pygame.display - pygame module to control the display window and screen
2.The pygame.event - pygame module for interacting with events and queues module contains the
various event types.
3. The pygame.key - pygame module to work with the keyboard module lists the keyboard constants
and modifiers (K_* and MOD_*) relating to the key and mod attributes of
the KEYDOWN and KEYUP events.
4. The pygame.time - pygame module for monitoring time module defines TIMER_RESOLUTION.
pygame.time.get_ticks get the time in milliseconds
pygame.time.wait pause the program for an amount of time
pygame.time.delay pause the program for an amount of time
pygame.time.set_timer repeatedly create an event on the event queue
pygame.time.Clock create an object to help track time