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

Jean-Paul Calderone exarkun at divmod.com
Thu Nov 10 04:08:52 CET 2005


On Thu, 10 Nov 2005 16:02:04 +1300, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
>Michiel Jan Laurens de Hoon wrote:
>
>> At this point, I can't propose a specific modification yet because I
>> don't know the reasoning that went behind the original choice of Tk as
>> the default GUI toolkit for Python
>
>Probably because at the time it was really the
>only cross-platform GUI toolkit that worked
>about equally well (or equally badly, depending
>on your point of view) on all the major
>platforms.
>
>I'm not sure the event-loop situation would be
>much different with another one, anyway. From what
>I've seen of GUI toolkits, they all have their own
>form of event loop, and they all provide some way
>of hooking other things into it (as does Tkinter),
>but whichever one you're using, it likes to be in
>charge. Code which blocks reading from standard
>input doesn't fit very well into any of them.
>

Of course, the problem could be approached from the 
other direction: the blocking reads could be replaced 
with something else...

Jean-Paul


More information about the Python-Dev mailing list