[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] interactive pygame?
> your other problem is with moving, raising, and minimizing. the problem
> is these happen in the same thread as the interactive python. so while
> the prompt is sitting there, pygame can't do anything with the window.
> all the actions you have taken are sitting inside the system event
> queue, but pygame/SDL need a chance to go receive those events and
> process them.
> calling pygame.event.pump() will tell pygame and SDL to handle the
> windows events. you could also call any of the other pygame.event
> functions which effect the pygame event queue.
> the pump() function will return pretty quick, but any window
> interactions you have made will all happen very quick. you will have to
> call pump() anytime you do something to the window for it to react.
Cool. Can you do something really perverse like spawn a new thread to
do the pumping in the background every 1 second? :^)
Alan