John Fouhy wrote:
> If you want to do multithreaded programming with a GUI, one good way
> is to use .after_idle.
> 
> ie, instead of myturns.insert(str(i)), do
> top.after_idle(myturns.insert, str(i))  (I think this is the right
> syntax).  This will cause the mainloop thread to run the code instead.

Another way to do this without a separate thread is to use top.after() 
to schedule the inserts. Schedule the first one before calling 
mainloop(), and have each insert schedule the next one.

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to