Hi Kent and John,
Thanks a lot for the advice on how to improve my program. I will look
into separating the data and model as John suggests here. I didn't know
about after_idle() and after(); seems that dir()'ing the classes
sometimes gives out a lot more information than you can chew at any
g
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 inste
Hugo González Monteverde wrote:
> Hi All,
>
> I wrote a small turn delivering graphical app that is supposed to
> display turns in a queue.
> def insert(self, turn_string):
> """Insert a new turn into the queue, move the rest upwards,
> delete oldest."""
This is overly complicate
On 10/02/06, Hugo González Monteverde <[EMAIL PROTECTED]> wrote:
> Sorry for replying to myself, but I found a page that says that it can
> be done without threads... so it hit me: use threads!!! (duh)
Yes, this will be what you need. Your GUI won't do anything until you
run mainloop, and mainloo
Sorry for replying to myself, but I found a page that says that it can
be done without threads... so it hit me: use threads!!! (duh)
Ok, for future reference, this is the part where I use the classes I
defined:
if __name__ == "__main__":
top = Tkinter.Tk()
myturns = TurnQueue(top, pw=
Hi All,
I wrote a small turn delivering graphical app that is supposed to
display turns in a queue.
If I instantiate the class and call its methods, thus displaying strings
in several canvases, from the interactive prompt, everything works fine.
If I do it when running the script as a progra