How do I avoid the Tkinter 30 msec polling loop.

Mike Clarkson support at internetdiscovery.com
Sat Mar 17 22:34:59 CET 2001


On Sat, 17 Mar 2001 18:41:52 GMT, "David Allen" <mda at idatar.com>
wrote:
>
>Check out:
>http://www.pythonware.com/library/tkinter/introduction/x9129-alarm-handlers-and-other.htm
>
>It is a page on Tkinter non-event callbacks.  It has
>a set of methods described there for Tkinter where you
>can call a certain function once every X milliseconds
>where you specify X.  If you read that page, I think
>it will answer your questions.

No, his question is about a fundamental _tkinter.c inefficiency.

BTW, there is an incompleteness in the documentation on that page:
The documentation for after_cancel does not mention where `id' comes
from, and the documentation for after() does not note the most
important usage of after(), namely 
	id = after(ms,func)

>From the Tkinter.py source code:

    def after(self, ms, func=None, *args):
        """Call function once after given time.

        MS specifies the time in milliseconds. FUNC gives the
        function which shall be called. Additional parameters
        are given as parameters to the function call.  Return
        identifier to cancel scheduling with after_cancel."""

Mike.



More information about the Python-list mailing list