I need a simple popup that indicates the execution of the program and disappears when finished. It should only serve to indicate to the user that the script is running. I have PySimpleGUI.
1 Answer
This code will popup a window.
import PySimpleGUI as sg
sg.popup('This is my popup message')
Do you want it to "block", waiting for the user to click OK? You can also have it autoclose after a while. Or, you can make it not-block and your program will immediately continue executing.
It's all described in the PySimpleGUI documentation under the Popup section.
Here's is code that will show the Popup window. Your program will NOT block on it and will thus continue running immediately
import PySimpleGUI as sg
sg.popup_non_blocking('This is my popup message')
print('My program continued')
When the program is done running, the window will disappear.
The plain popup function also has a parameter to indicate if you want it to be a non-blocking call that you can use instead of the popup_non_blocking function. The popup_non_blocking function calls popup with this parameter set for you.