As you use windows and not popups you have to catch signals from all windows.
Your code works with minor changes (I changed the "rc= reverseComplement(seq)" as I don't know what it does)
Your code works with minor changes (I changed the "rc= reverseComplement(seq)" as I don't know what it does)
import PySimpleGUI as sg sg.theme('DarkAmber') layout = [[sg.Text('Reverse complement:', size=(15,1), key='-OUTPUT-')], [sg.Input(key='-IN-')], [sg.Button('Convert'), sg.Button('Exit'), sg.Button('Help')]] window= sg.Window('Reverse Complement Converter', layout, finalize = True) window_help = None while True: win, event, values = sg.read_all_windows() # Read all signals from all windows if event in (sg.WIN_CLOSED, 'Exit', 'Cancel'): if win == window: break elif window_help and win == window_help: window_help.close() window_help = None elif event == 'Convert': seq=values['-IN-'] rc= "YES!" #reverseComplement(seq) window['-OUTPUT-'].update(rc) elif event == "Help": layout_help = [[sg.Text("This program requires a DNA sequence as an input and returns the reverse complement")],[sg.Button("Cancel")]] window_help = sg.Window("Help", layout_help, finalize = True) window.close()