Python Forum
PySimpleGUI Try Except
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PySimpleGUI Try Except
#2
Hi all,

I found the solution in the end :

try:
    imageView['imageview'].update(filename = (r'your path\\yourimage'+".jpg"))
                            
    while True:             
        event,values = imageView.read()
        if event == sg.WIN_CLOSED:
            break
except:
        sg.popup("Image not found")
while dad_has_cigs == True:
    happiness = True
    if dad_has_cigs == False:
    print("Dad come home!")
    happiness = not happiness
    break
Reply


Messages In This Thread
PySimpleGUI Try Except - by jamesaarr - Nov-18-2021, 01:37 PM
RE: PySimpleGUI Try Except - by jamesaarr - Nov-18-2021, 02:02 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020