<div dir="ltr">Hi all,<div>I have created a GUI using Tkinter. </div><div>I have a button &quot;GO&quot;, which when clicked calls a function (mainFunc).</div><div>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.</div>

<div><br></div><div>I have attempted the following:</div><div><ol><li> 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.</li>

<li> When I tried to create a  thread whose target = root.mainloop(), the GUI doesn&#39;t display at all, (Python.app launches but the GUI is not displayed), </li></ol><div><b>Can you please help me how to create threads exactly???</b></div>

<div><br></div><div>I am attaching my code along with the mail</div><div><br></div><div>main. mainFunction() is the function that takes approx 60 seconds to execute and that should be running in parallel with GUI/ in background.</div>

<div>Thanks in advance...</div><div><br></div></div><div><div><br></div>
</div></div>