Python - pythoncom.PumpMessages()

user3818650 picture user3818650 · Jun 7, 2015 · Viewed 9.9k times · Source

I'm surprised to see that there is not a lot of explained documentation on the function pythoncom.PumpMessages(), or for the pythoncom module.

So what does pythoncom.PumpMessages() and pythoncom.PumpWaitingMessages()do and how? All I really know about it is used for catching events from input devices.

Answer

da Vinci picture da Vinci · Aug 18, 2015

The documentation on these methods can be found here.

The relevant bits are:

  • PumpWaitingMessages: Pumps all waiting messages for the current thread.
  • PumpMessages: Pumps all messages for the current thread until a WM_QUIT message.