Added window close at end to cleanup

This commit is contained in:
MikeTheWatchGuy 2019-05-25 12:09:37 -04:00
parent 9ab44d7e48
commit 2c01c06580
1 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,7 @@ window = sg.Window('This is your Application Window', layout)
counter = 0
timeout = 100
while True: # Event Loop
while True: # Your Event Loop
PySimpleGUIdebugger.refresh(locals(), globals()) # STEP 3 - refresh debugger
event, values = window.Read(timeout=timeout)
if event in (None, 'Exit'):
@ -37,4 +37,5 @@ while True: # Event Loop
elif event == 'Ok':
print('You clicked Ok.... this is where print output goes')
counter += 1
window.Element('_OUT_').Update(values['_IN_'])
window.Element('_OUT_').Update(values['_IN_'])
window.Close()