pyGame - Logitech rumble pad input OS X (10.3.9)

Terry Hancock hancock at anansispaceworks.com
Tue Aug 30 18:09:15 EDT 2005


On Tuesday 30 August 2005 03:17 pm, kjm wrote:
> I have modified/written a small piece of code that initializes the
> joystick, and pygame does recognize it.  I was wondering if someone has
> a small snippet of code to get me going?  I have posted the code I'm
> using to initialize the joystick, plus it's output below.

First of all, you'd be much better off asking this question on
the pygame mailing list ( pygame-users at seul.org ).

But ...

> pygame.event.pump()
> #necessary for os to pass joystick events

You understand, you have to call pygame.event.pump()
ONCE PER EVENT LOOP?

The code you posted doesn't do that.  "pump" doesn't
start a separate thread or anything, it just polls the
event queue and runs some pygame code to update state.

You must repeatedly call it to check for events.

Pygame tries to be very straightforward and explicit.
There isn't much hidden "magic" going on (although
movie and sound objects *do* process things in background
threads).

Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com




More information about the Python-list mailing list