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

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Nov 10 04:02:04 CET 2005


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.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-Dev mailing list