I have a Python GUI tkinter application.
When I press a button in my GUI, I have a long-running task to perform.
So I want to run this task in another thread and only when it's done, update some GUI elements e.g. add text to some Text
widget. And while it's running I want to e.g. update some status bar so that process is nicely visible to the user.
I had done this in Java long ago using SwingUtilities.invokeLater
https://docs.oracle.com/javase/tutorial/uiswing/concurrency/initial.html
What is the Python analogue or say best practice for this kind of thing?
Could you point me to some references or provide me with a simple example?
Also... in Python... does it matter if I handle the long running task in a thread or in a process? Will the UI updating code/technique be different?