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

Aahz aahz at pythoncraft.com
Mon Nov 14 20:56:50 CET 2005


On Sun, Nov 13, 2005, Josiah Carlson wrote:
> 
> I personally like Edward Loper's idea of just running your own event
> handler which deals with drawing, suspend/resume, etc...
> 
>> If, however, Python contains an event loop that takes care of events as 
>> well as Python commands, redrawing won't happen until Python has 
>> executed all plot commands -- so no repainting in vain here.
> 
> ...but even without posting and reading events as stated above, one
> could check for plot events every 1/100th a second.  If there is an
> update, and it has been 10/100 seconds since that undrawn event happened,
> redraw. Tune that 10 up/down to alter responsiveness characteristics.

...and that's exactly what my sample threaded GUI application does.

Can we please move this thread to comp.lang.python?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you think it's expensive to hire a professional to do the job, wait
until you hire an amateur."  --Red Adair


More information about the Python-Dev mailing list