0

I used Tkinter to create a simple UI for my python script. It's quite a long program and once the user clicks on a button, it takes at least 5 mins to finally create the output Excel sheet. In the meanwhile, I want to use the text widget to keep the user informed of the status. But when I use text.insert(index,'Fetching rates...\n') everytime, the text widget gets validated only when the whole execution completes and the cursor remainis in sandclock mode the whole time. Please help out.

0

1 Answer 1

1

As like most GUI systems, Tkinter is basically a single threaded system.So,when the operation begins in Excel sheet,your GUI stops responding.Try using update_idletasks() if you want to force the GUI to show the text.

For more details,visit this

Sign up to request clarification or add additional context in comments.

8 Comments

you are welcome buddy ;). You should try the make the whole UI responsive though
I'm a newbie. Could you elaborate?
What i'm trying to say is you should try to use root.update_idletasks or frame.update... or canvas.update... or whatever it is you are using so that your whole UI is responsive & not just the text area
hey, why does the application go gray (title bar says 'Not Responding') when I click anywhere on the window when idletasks is doing its job?
that means your update_idletasks is not doing its job properly,which means you haven't used it well. Like i said yesterday,don't use it with a widget,but with the root or frame or canvas.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.