[Tutor] yet more Tkinter problems (sorry guys)

Magnus Lycka magnus@thinkware.se
Thu Nov 21 04:50:02 2002


At 16:30 2002-11-21 +1300, Thomi Richards wrote:
>hmmm.. maybe i should have learnt wxpython instead. still, i guess it's
>not too late to start, but Tkinter was fairly easy for me, is wxwindows
>any harder?

I'm not at all sure this will be easier in wxPython.

Jacob Hall=E9n has written a Cookbook recipe on using Tkinter
with threading. I'm sure you can adapt that.
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/82965

In processIncoming you will update your progress bar, and in
workerThread1 you will do your long running processing, and
queue the progress messages for the progress bar at regular
intervals.

Fredrik Lundh's Introduction to Tkinter describes things
like after_idle (section 44 - Alarm handlers and other
non-event callbacks) that works similar to EVT_IDLE in wx.
http://www.pythonware.com/library/tkinter/introduction/index.htm

If you don't want to use threading, that's another option, but
I haven't really seen any example of that, but I guess you
can find that if you Google for after_idle.


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