[Python-Dev] Event loops, PyOS_InputHook, and Tkinter
skip@pobox.com
skip at pobox.com
Sat Nov 12 03:32:57 CET 2005
Michiel> 1) What if the user decides to import Tkinter next? Tkinter
Michiel> notices that PyOS_InputHook is already set, and does not
Michiel> reset it to its own event loop. Hence, Tkinter's events are
Michiel> not handled. Similarly, if a user imports Tkinter before my
Michiel> extension module, I don't reset PyOS_InputHook, so Tkinter's
Michiel> events are handled but not mine. If I were to reset
Michiel> PyOS_InputHook to my extension module's event loop, then my
Michiel> events get handled but not Tkinter's.
This sounds sort of like the situation that existed with sys.exitfunc before
the creation of the atexit module. Can't we develop an API similar to that
so that many different event-loop-wanting packages can play nice together?
(Then again, maybe I'm just being too simpleminded.)
Skip
More information about the Python-Dev
mailing list