All pastes #237933 Raw Edit

Anonymous

public text v1 · immutable
·published 2006-11-04 20:15 UTC
rendered paste body
import pygame
from pygame.locals import *

pygame.init()
j = pygame.joystick.Joystick(0)
j.init()
while 1:
	for event in pygame.event.get():
		if event.type == JOYAXISMOTION:
			print "axis:", event.axis, "value:", event.value
		elif event.type == JOYBUTTONDOWN:
			print "button_down:", event.button
		elif event.type == JOYBUTTONUP:
			print "button_up:", event.button