def getNumJoysticks():
 if (backend == 'pyglet'):
  return len(pyglet_input.get_joysticks())
 else:
  pygame.joystick.init()
  return pygame.joystick.get_count()

def getNumJoysticks ( ) : if ( backend == 'pyglet' ) : return len ( pyglet_input . get_joysticks ( ) ) else : pygame . joystick . init ( ) return pygame . joystick . get_count ( )
return a count of the number of joysticks available .