I've created a little GUI for one of my scripts. All is working well.
When I click on one Button, it launches a big function that is parsing a lot of data from some websites.
But once I've clicked on the Button, the program Freezes until the function is run entirely. All is working fine, but why is my GUI freezing during the execution of the function. I'd like to print a little progress bar, but it's not possible.
Here is part of the program:
self.Button1 = Button(self.MENU, text="IELTS", command=self.My_Command)
self.Button1.grid(row=0, column=0,sticky=W+E)
def My_Command(self):
## HERE WE LAUNCH THE FUNCTION
Module_1.main() # My Big Function from another file
self.Button1.config(text="DONE")
I can't do/print anything durint the execution of Module_1.main() ... the GUI is totally freezed.
The Module_1.main() function is a threaded parser (parsing some data from two websites), it takes generally 2 minutes to be ran. If someone have an idea to be able to interact with the program during the 2 minutes needed for the execution of this function, it would be very helpful.