All pastes #474765 Raw Edit

Mike

public python v1 · immutable
·published 2007-05-07 00:11 UTC
rendered paste body
import pygamefrom pygame.locals import *pygame.init()pygame.joystick.init() print pygame.joystick.get_count() j = pygame.joystick.Joystick(1) j.init() print j.get_name()print j.get_numaxes()print j.get_numbuttons()print j.get_init() axes = ""buttons = "" i=0while (True):    for event in pygame.event.get():        if event.type == QUIT:            break    for i in range(0, j.get_numaxes()):        if (j.get_axis(i) != 0 and False):            print "Axis %d moved" % i    for i in range(0, j.get_numbuttons()):        if (j.get_button(i)):            print "Button %d" % i    #for i in range(0, j.get_numaxes()):    #    axes += " " + str(j.get_axis(i))     #for i in range(0,j.get_numbuttons()):    #    buttons += " " + str(j.get_button(i))     #print axes + " " + buttons