[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Wii Remote support -- first patch



"Luke Paireepinart" <rabidpoobear@xxxxxxxxx> asked:

> Are you assuming that the user calls pump, or does pygame have some
> internal thread that consistently calls pump?
> or does pygame.event.get call pump as well?
> how does all that jazz work?

Yeah, I'm assuming that the user calls one of these functions every frame:

pygame.event.pump
pygame.event.get

Looking at the event documentation (
http://www.pygame.org/docs/ref/event.html ), my guess would be that they
end up calling some common code.

In particular, looking at the various references on that page to "pump",
it looks like there's a certain amount of housekeeping that needs to go on
periodically (like pygame internally processing windows messages) and
"pump" is the minimal way to get that done, but if you want to do that,
plus receive event notifications, "get" does both.

I'm afraid I can't speak to how it happens inside. It could be turtles,
for all I know.


-Dave LeCompte