[python-win32] Idle Event

Gerdus van Zyl gerdusvanzyl at gmail.com
Sun Mar 30 11:45:04 CEST 2008


So to answer my own question: use win32gui.PumpWaitingMessages, it
uses peekmessage.

so you can then replace
PumpMessages()
with:
while PumpWaitingMessages() == 0:
   #some idle function or processing here

~gvz

On Fri, Mar 28, 2008 at 11:59 AM, Gerdus van Zyl <gerdusvanzyl at gmail.com> wrote:
> Hi,
>
>  How can I run a function when the event loop is idle? It's for
>  animation and some layout calculation. Currently I am doing that using
>  threads but the responsiveness of my application is suffering.
>
>  Thank you
>  ~Gerdus
>


More information about the python-win32 mailing list