dominic
08-12-2005, 04:07 PM
Hi,
I want to use input from a gamepad, so in my main class I have:
-----------
#main class
from Joystick import *
import viz
import sid
viz.go()
oh = Joystick()
sid.callback(sid.BUTTONDOWN_EVENT,oh.sayhello)
-------------
and in my Joystick.py file / class, I have:
--------------
class Joystick(object):
def sayhello(self, num):
print "hello world ", num
So, everything works but the line "oh = Joystick()" is highlighted in yellow. Any ideas, how I can fix that or what I am doing wrong?
Dominic
I want to use input from a gamepad, so in my main class I have:
-----------
#main class
from Joystick import *
import viz
import sid
viz.go()
oh = Joystick()
sid.callback(sid.BUTTONDOWN_EVENT,oh.sayhello)
-------------
and in my Joystick.py file / class, I have:
--------------
class Joystick(object):
def sayhello(self, num):
print "hello world ", num
So, everything works but the line "oh = Joystick()" is highlighted in yellow. Any ideas, how I can fix that or what I am doing wrong?
Dominic