guys! I understand if this question may seem stupid, or has been asked about a million times, but how do I use yes/no popups on PySimpleGUI? I’ve searched everywhere, but the answers just aren’t clear on this.
At the moment, I am just trying to make a simple yes/no program so I can get my head around this.
Here’s my code so far:
import PySimpleGUI as sg
import time
sg.popup("Welcome to this random file.")
result = sg.popup_yes_no("Would you like to continue?")
if(result == "yes"):
sg.popup("Great! You have chosen to continue the process.")
elif(result == "no"):
sg.popup("Exiting process...")
sg.popup("See you!")
time.sleep(3)
exit()
else:
sg.popup("Invalid input")
New contributor
user26149746 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.