[Tkinter-discuss] Exit from method loop

Andreas Ostermann andreas.ostermann.11 at googlemail.com
Tue Apr 9 09:22:21 CEST 2013


Hi,

if it should loop continuously, why don't you put it into a background
thread?

Or, as you are using sleep() remove the loop and use root.after() to invoce
the check method every now and then...

brgds,

AO



2013/4/9 Paul Simon <psimon at sonic.net>

> Hi All,
>
> I've attaached code simplified from my "opus" and have a problem.  I would
> like to exit from "read_sensor" into the main loop.  I cannot access the
> "stop" check button or the "quit" button while the intenal loop in
> "read_sensor" is running.  The internal loop is intended to run
> continuously
> until interrupted by the "stop" button but for demo purposes it is set to
> 10
> interations.
>
> Paul Simon
>
>
>
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20130409/73c66e1d/attachment.html>


More information about the Tkinter-discuss mailing list