Added handling of multiple arguments

This commit is contained in:
PySimpleGUI 2022-10-27 15:54:58 -04:00
parent 4e24b582f1
commit 68b5272bb6
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ def main():
if event in (sg.WIN_CLOSED, 'Exit'): if event in (sg.WIN_CLOSED, 'Exit'):
break break
elif event == 'Run': elif event == 'Run':
sp = sg.execute_command_subprocess(values['-IN-'], pipe_output=True, wait=False) cmd_list = values['-IN-'].split(' ')
sp = sg.execute_command_subprocess(cmd_list[0], *cmd_list[1:], pipe_output=True, wait=False)
results = sg.execute_get_results(sp, timeout=1) results = sg.execute_get_results(sp, timeout=1)
print(results[0]) print(results[0])