[Tutor] yet more Tkinter problems (sorry guys)

Magnus Lycka magnus@thinkware.se
Wed Nov 20 06:26:01 2002


At 22:04 2002-11-20 +1300, Thomi Richards wrote:
>Is there a way to force Tkinter to
>update more often? i think it's simply a problem of tkinter not being
>able to get enough cpu cycles to update itself - when my program runs,
>it uses all 99.8% of my AMD XP1800+..

The main loop will call your callback functions as the
events happen that trigger them. Nothing else will happen
while a function/method you defined is running. Control
won't return to the main loop until your method/function
exits.

There are several ways to handle long running tasks. On is to
divide your work in many function calls and cause some event to
be generated for each file. Another is to use different threads.
I'm more used to wxPython than to Tkinter though. Maybe you
can get some ideas from this page (not that the code examples
will be of any use...)

http://wiki.wxpython.org/index.cgi/LongRunningTasks



-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se