[Tkinter-discuss] Tkinter GUI freezing
Bharath Reddy A.
bharath270392 at gmail.com
Thu Apr 19 17:32:58 CEST 2012
Hi all,
I have created a GUI using Tkinter.
I have a button "GO", which when clicked calls a function (mainFunc).
That function takes around 60 seconds to execute and in the mean time
outputs many numbers which have to be displayed in a list in the GUI.
I have attempted the following:
1. I created a thread whose target = mainFunc, when the button is
clicked. I can see the function printing stuff in terminal. But the GUI
still freezes.
2. When I tried to create a thread whose target = root.mainloop(), the
GUI doesn't display at all, (Python.app launches but the GUI is not
displayed),
*Can you please help me how to create threads exactly???*
I am attaching my code along with the mail
main. mainFunction() is the function that takes approx 60 seconds to
execute and that should be running in parallel with GUI/ in background.
Thanks in advance...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120419/a9ce4960/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: interface.py
Type: application/octet-stream
Size: 7228 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120419/a9ce4960/attachment.obj>
More information about the Tkinter-discuss
mailing list