Re: My Tkinter Threading nightmare

2007-01-25 Thread Aahz
In article <[EMAIL PROTECTED]>, Paul Rubin wrote: > > self.progressWindow.protocol('WM_DELETE_WINDOW', self.callback) > >becomes > > gui.cmd_queue.put(self.progressWindow.protocol, > ('WM_DELETE_WINDOW', self.callback)) > >where gui is the Window

Re: My Tkinter Threading nightmare

2007-01-25 Thread Paul Rubin
[EMAIL PROTECTED] writes: > > try: > > func, args, kw = self.cmd_queue.get(block=False) > > except QueueEmpty: > > return > > func (*args, **kw) > > Thanks Paul. That has made more sense than all of my scrounging > combined,

Re: My Tkinter Threading nightmare

2007-01-25 Thread half . italian
On Jan 24, 7:35 pm, Paul Rubin wrote: > Paul Rubin writes: > > def idle(self): > > # read and execute any commands waiting on the queue > > while True: > > try: > >func, args, kw = self.cmd_qu

Re: My Tkinter Threading nightmare

2007-01-24 Thread Paul Rubin
Paul Rubin writes: > def idle(self): > # read and execute any commands waiting on the queue > while True: > try: >func, args, kw = self.cmd_queue.get(block=False) > except QueueEmpty: >return

Re: My Tkinter Threading nightmare

2007-01-24 Thread Paul Rubin
[EMAIL PROTECTED] writes: > and setup the callback to kill the operation and then the window when > the user clicks on the X of the progress window. I've implemented this > in my code, but clicking on the X does nothing until I kill the main > thread (i think), and then my callback is run. I've a

My Tkinter Threading nightmare

2007-01-24 Thread half . italian
Hi all, I don't really understand how to properly use threading in my programs, however I have managed to get by so far using them improperly. Once again I have come up to what I think is something that won't work because of the way the program is set up. I have a long running process running un