A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-November/058107.html below:

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

[Python-Dev] Event loops, PyOS_InputHook, and TkinterJosiah Carlson jcarlson at uci.edu
Mon Nov 14 08:16:28 CET 2005
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.

Or heck, if you are really lazy, people can use a plot() calls, but
until an update_plot() is called, the plot isn't updated.

There are many reasonable solutions to your problem, not all of which
involve changing Python's event loop.

 - Josiah

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4