Merge pull request #2636 from PySimpleGUI/Dev-latest

Correctly adjust the output from the shell output by trimming off the…
This commit is contained in:
PySimpleGUI 2020-02-24 15:41:34 -05:00 committed by GitHub
commit 8069d4f62a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -13068,7 +13068,7 @@ def _process_thread(*args):
global __shell_process__ global __shell_process__
# start running the command with arugments # start running the command with arugments
print(f'running args = {args}') # print(f'running args = {args}')
try: try:
__shell_process__ = run(args, shell=True, stdout=PIPE) __shell_process__ = run(args, shell=True, stdout=PIPE)
except Exception as e: except Exception as e:
@ -13118,6 +13118,7 @@ def shell_with_animation(command, args=None, image_source=DEFAULT_BASE64_LOADING
popup_animated(None) # stop running the animation popup_animated(None) # stop running the animation
output = __shell_process__.__str__().replace('\\r\\n', '\n') # fix up the output string output = __shell_process__.__str__().replace('\\r\\n', '\n') # fix up the output string
output = output[output.index("stdout=b'")+9:-2]
return output return output