diff --git a/DemoPrograms/Demo_GitHub_File_Copier.py b/DemoPrograms/Demo_GitHub_File_Copier.py index 7627c541..1a4be6ba 100644 --- a/DemoPrograms/Demo_GitHub_File_Copier.py +++ b/DemoPrograms/Demo_GitHub_File_Copier.py @@ -251,10 +251,14 @@ def run(app_name, parm=''): def run_py(pyfile, parms=None): - if parms is not None: - execute_command_subprocess('python', pyfile, parms) + if sys.platform == 'linux': + cmd = 'python3' else: - execute_command_subprocess('python', pyfile) + cmd = 'python' + if parms is not None: + execute_command_subprocess(cmd, pyfile, parms) + else: + execute_command_subprocess(cmd, pyfile) def execute_command_subprocess(command, *args, wait=False): @@ -262,7 +266,7 @@ def execute_command_subprocess(command, *args, wait=False): arg_string = '' for arg in args: arg_string += ' ' + str(arg) - sp = subprocess.Popen(['python3' + arg_string, ], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) + sp = subprocess.Popen([command + arg_string, ], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) else: expanded_args = ' '.join(args) sp = subprocess.Popen([command, expanded_args], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)