[Python-Dev] Event loops, PyOS_InputHook, and Tkinter

Noam Raphael noamraph at gmail.com
Mon Nov 14 23:39:13 CET 2005


On 11/15/05, Fredrik Lundh <fredrik at pythonware.com> wrote:
> If you want to write portable code that keeps things running "in the
> background" while the users hack away at the standard interactive
> prompt, InputHook won't help you.
>
So probably it should be improved, or changed a bit, to work also on
Windows. Or perhaps it's Tkinter. Anyway, what I'm saying is - don't
use threads! Process events in the main thread while it doesn't run
the user's Python code. If he runs another thread - that's his
problem. The implicit event loop should never execute Python code
while a user's Python code is running in the main thread.

Noam


More information about the Python-Dev mailing list