Robert Kern wrote: > Mike Lawrence wrote: > >> Hi all, >> >> I've managed to switch my programming *almost* completely from pygame >> to pyglet now. This switch was motivated primarily because I use Mac >> OS 10.5, which comes with python 2.5 installed by default, forcing one >> to install python 2.4 if you want to use pygame. I say the switch is >> *almost* complete because I desperately need joystick input for my >> programs (I write cognitive science experiments). >> >> Does anyone have any suggestions as to how I can achieve joystick >> input without reverting to python 2.4 and using pygame? >> >> I'd be really grateful for any input as this represents a significant >> roadblock for the progress of my research. >> > > For Mac-only use, you can try PyHID, which appears to wrap most of the USB > HID > functionality of OS X into convenient APIs. I haven't used it (yet), but I > just > stumbled on it and thought it might help you. > You could maybe use ctypes to directly access the operating system's HID interface. Assuming the joystick uses the generic HID system. This is the way I communicated with the Wii Remote. I just called some routines in kernel32.dll to access the generic HID that the wii remote identified itself as, and then I could just read / write data to it like it was a file. You might have to do some research on how to parse joystick data, but this should be a fast way to do it.
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pyglet-users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pyglet-users?hl=en -~----------~----~----~----~------~----~------~--~---
