Connect/Process a script to PySimpleGUI button
问题 can you guys help me to know how to connect a button in my PySimpleGui script which will execute another python script when the run button is pressed/clicked. For now, i've been reading about Subprocess and command = os.popen in a GUI script. layout = [[ sg.Text('Click the button to launch Program')], [sg.Button('Launch')]] win1 = sg.Window('My new window').Layout(layout) win2_activate = False while True: ev1, vals1 = win1.Read() if ev1 is None or ev1 == 'Cancel': break if not win2_activate