I have a Python script that runs in the background, i.e. when running this script the end user cannot see how far the script is until it is finished after 30 min or if it is stuck somewhere.
I would now like to have a status window for the end user in Windows that displays a text after milestones in the script have been reached (e.g. when the Python interpreter has reached line 100 in the script, the text "10% of processing is complete" is displayed in the status window).
How can I do implement this?
I tried already the tkinter package. Unfortunately, the pop-up window that is opened with the tkinter package always requires an action of the end user, i.e. either press "ok" in the pop-up window or close the pop-up window, until the Python interpreter continues with the execution of the next line of code. However, I want to avoid any action of the end user, but just show some text in the status window, while the Python interpreter continues inimpeded.
Here is a simple function that does the progressbar using the tqdm library.
In the above example the progress bar (pbar) is essentially used as a global. You can then update the pbar by calling pbar.update(x) for each step. Without a base code on how you are implementing your task I can't exactly assist anymore than this. The question thread posted suggests threading etc. All of which are good solutions depending on your actual tasking.