Re: [Tutor] Tkinter and threading

2016-06-02 Thread Marco Soldavini
Thanks for you answers! On Thu, Jun 2, 2016 at 6:39 PM, Peter Otten <__pete...@web.de> wrote: >> For example a state machine with a var state which can have some >> discrete string values (like RUNNING, STOPPED, PAUSED, ABORTED, IDLE) >> and a text element on the gui that reports that state. >> >

Re: [Tutor] Tkinter and threading

2016-06-02 Thread Peter Otten
Marco Soldavini wrote: > Hello, > probably this is a very naive question, but I've read some stuff on > Tkinter and its infinite loop. > > Then about how can i bind actions to elements, for example buttons. > > What if I want to run another loop beside the graphical interface in > the same pytho

Re: [Tutor] Tkinter and threading

2016-06-02 Thread Alan Gauld via Tutor
On 02/06/16 14:40, Marco Soldavini wrote: > What if I want to run another loop beside the graphical interface in > the same python script? You need to do it in a separate thread. Keep the Tkinter loop on your main thread and use it to trigger actions. > For example a state machine with a var sta

[Tutor] Tkinter and threading

2016-06-02 Thread Marco Soldavini
Hello, probably this is a very naive question, but I've read some stuff on Tkinter and its infinite loop. Then about how can i bind actions to elements, for example buttons. What if I want to run another loop beside the graphical interface in the same python script? For example a state machine w