1

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
  • Show your code attempts Commented Feb 25, 2019 at 8:10

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

This is a really simple solution that does exactly what was asked for. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.