The joystick module provides a few functions to initialize
the joystick subsystem and to manage the Joystick objects. These
objects are created with the pygame.joystick.Joystick() function.
This function needs a joystick device number to work on. All
joystick devices on the system are enumerated for use as a Joystick
object. To access most of the Joystick functions, you'll need to
init() the Joystick. (note that the joystick module will already
be initialized). When multiple Joysticks objects are created for the
same joystick device, the state and values for those Joystick objects
will be shared.
Joystick control values are only updated during the calls to the event
queue. Call pygame.event.pump() if you are not using the event queue for
any input handling. Once a joystick object has been initialized, it will
start to send joystick events to the input queue.
Be sure to understand there is a difference between the joystick module
and the Joystick objects.