From 5d65afa1943077d5a6e9dfc06ee30193981dbf52 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Fri, 12 Mar 2021 16:59:32 +0100 Subject: [PATCH] Forward stdout of spind subprocs to pyzebra app --- pyzebra/app/panel_spind.py | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pyzebra/app/panel_spind.py b/pyzebra/app/panel_spind.py index 57837da..951d701 100644 --- a/pyzebra/app/panel_spind.py +++ b/pyzebra/app/panel_spind.py @@ -45,7 +45,7 @@ def create(): temp_hkl_file = os.path.join(temp_dir, "hkl.h5") roi_dict = ast.literal_eval(selection_list.value) - subprocess.run( + comp_proc = subprocess.run( [ "mpiexec", "-n", @@ -59,11 +59,16 @@ def create(): temp_hkl_file, ], check=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + text=True, ) + print(" ".join(comp_proc.args)) + print(comp_proc.stdout) diff_vec = prepare_event_file(temp_event_file, roi_dict, path_prefix_textinput.value) - subprocess.run( + comp_proc = subprocess.run( [ "mpiexec", "-n", @@ -84,7 +89,12 @@ def create(): str(eval_hkl_tol_spinner.value), ], check=True, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + text=True, ) + print(" ".join(comp_proc.args)) + print(comp_proc.stdout) try: with open(os.path.join(temp_dir, "spind.txt")) as f_out: