This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from pygame.locals import * | |
from OpenGL.GL import * | |
from OpenGL.GLU import * | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame,sys,glob | |
pygame.init() | |
#from pygame import * | |
try: | |
j = pygame.joystick.Joystick(0) # create a joystick instance | |
j.init() # init instance | |
print ("Enabled joystick: {0} with {1} buttons".format( j.get_name(),j.get_numbuttons())) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
import sys | |
pygame.init() # Loads pygame engine | |
pygame.joystick.init() # main joystick device system | |
try: | |
j = pygame.joystick.Joystick(0) # create a joystick instance | |
j.init() # init instance | |
print ("Enabled joystick: {0}".format(j.get_name())) |
NewerOlder