[Python-Dev] Event loops, PyOS_InputHook, and Tkinter
"Martin v. Löwis"
martin at v.loewis.de
Thu Nov 10 08:30:51 CET 2005
Michiel Jan Laurens de Hoon wrote:
> It's not because it likes to be in charge, it's because there's no other
> way to do it in Python.
As I said: this is simply not true.
> Tkinter is a special case among GUI toolkits because it is married to
> Tcl. It doesn't just need to handle its GUI events, it also needs to run
> the Tcl interpreter in between.
That statement is somewhat deceiving: there isn't much interpreter to
run, really.
> Which is why Tkinter needs to be in
> charge of the event loop. For other GUI toolkits, I don't see a reason
> why they'd need their own event loop.
They need to fetch events from the operating system level, and dispatch
them to the widgets.
Regards,
Martin
More information about the Python-Dev
mailing list