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

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Nov 14 02:27:48 CET 2005


Noam Raphael wrote:
> On 11/13/05, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> 
> > Noam Raphael wrote:
> >
> > > callback". Then, when the interpreter is idle, it will call all the
> > > registered callbacks, one at a time, and everyone would be happy.
> >
> > Except for those who don't like busy waiting.
>
> I'm not sure I understand what you meant. If you meant that it will
> work slowly - a lot of people (including me) are using Tkinter without
> a mainloop from the interactive shell, and don't feel the difference.

Busy waiting is less efficient and less responsive than
a solution which is able to avoid it. In many cases there
will be little noticeable difference, but there will be
some people who don't like it because it's not really
the "right" solution to this sort of problem.

-- 
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