Re: Statement orders

2005-10-02 Thread jepler
> would it be advisable to guard against this with something like this? > > def perform_longrunning_calculation(): > if not app.busy: > app.busy = 1 [...] By using that kind of construct, instead of using update_idletasks(), you force all code to be aware of and manage the app.busy

Re: Statement orders

2005-10-02 Thread David Murmann
[EMAIL PROTECTED] wrote: > Here's one case where it's bad to call update. > > def perform_longrunning_calculation(): > time.sleep(1) > app.update() > time.sleep(1) > would it be advisable to guard against this with something like this? def perform

Re: Statement orders

2005-10-02 Thread jepler
Here's one case where it's bad to call update. def perform_longrunning_calculation(): time.sleep(1) app.update() time.sleep(1) suppose you kick this off with a keybinding, such as: app.bind("c", lambda e: perform_longrunning_calculat

Re: Statement orders

2005-10-02 Thread David Murmann
Fredrik Lundh wrote: > Monu Agrawal wrote: > >> Hi I am making a gui based tool. When user preses a perticular button I >> am running a heavy command, before this I want to say user to wait with >> a image showing infront of her. >> >> My code is like: >> >> def loadData(self): >>top=Toplevel(

Re: Statement orders

2005-10-02 Thread Fredrik Lundh
Monu Agrawal wrote: > Hi I am making a gui based tool. When user preses a perticular button I > am running a heavy command, before this I want to say user to wait with > a image showing infront of her. > > My code is like: > > def loadData(self): >top=Toplevel(self.parent) >top.focus_set()

Statement orders

2005-10-02 Thread Monu Agrawal
Hi I am making a gui based tool. When user preses a perticular button I am running a heavy command, before this I want to say user to wait with a image showing infront of her. My code is like: def loadData(self): top=Toplevel(self.parent) top.focus_set()