I have a program which needs to respond to events from external sources, and if an alarm event is raised, to pop up an alert dialog (amongst other things). I’ve tried to achieve this much like the code in the process demo program, but rather than calling echo.py, I call a pythonscript which subscribes to a zeroMQ message queue and puts any received messages to stdout.
This is working fine when my application is the active window, but if it is not, then it doesn’t receive the alerts until the mouse is moved over the application window, or until the window is restored if it were minimised.
Is there some way that the idle loop can be set to execute periodically, even when the application is minimised, or not the active window? Alternatively, is there some other method for responding to external events which would work better?
This is running on Windows BTW.