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

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Nov 13 00:40:23 CET 2005


skip at pobox.com wrote:

> Python could dictate that the
> way to play ball is for other packages (Tkinter, PyGtk, wxPython, etc) to
> feed Python the (socket, callback) pair.  Then you have a uniform way to
> control event-driven applications.

Certainly, if all other event-driven packages are willing
to change their ways, they can be made to work together.
There's not much that can be done with them the way they
are, however.

Also, putting the main event loop in Python then gives
Python itself a privileged position that it shouldn't
necessarily have.

Ultimately I think there needs to be an event dispatching
mechanism provided by the OS, that is universally used
by all packages that want events. With the proliferation
of event-driven systems these days, it's becoming as
fundamental a requirement as file I/O and deserves
serious OS support, I think.

Greg



More information about the Python-Dev mailing list