[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Events



On Sat, Oct 26, 2002 at 10:06:07PM +0000, Lee Harr wrote:
> Maybe what you want is
> 
> pygame.event.get()
> 
> which will get all of the events in the queue,
> clearing it out in the process (you can just
> throw the return value away if it is not needed.)

It would. But calling it in your main loop means your garbage
collector will have to be paid for its hours of overtime.
Well maybe not hours.. but still you waste cpu cycles as opposed
to a .clear() which would already be handled on C level.
I used to use event.set_blocked rather but event.clear might
certainly be a valid solution for someone else.

> Looking through the documentation, I do not see any
> pygame.event.clear() method mentioned at all.

http://www.pygame.org/docs/ref/pygame_event.html#clear
As it's new in the cvs you probably won't find it in your
local copy of the docs :)

-- 
Raiser, Frank aka CrashChaos
IRC: irc.openprojects.net #pygame

A witty saying proves nothing.                           -- Voltaire
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org