[ENH]: Enable stdout and stderr capturing for AFNI commands #234
3 changed files with 7 additions and 3 deletions
1
docs/changes/newsfragments/234.enh
Normal file
1
docs/changes/newsfragments/234.enh
Normal file
|
|
@ -0,0 +1 @@
|
|||
Enable ``stdout`` and ``stderr`` capture for AFNI commands by `Synchon Mandal`_
|
||||
|
|
@ -70,12 +70,11 @@ class ALFFEstimator:
|
|||
If AFNI command fails.
|
||||
"""
|
||||
logger.info(f"AFNI command to be executed: {cmd}")
|
||||
# TODO: Figure out how to capture stdout and stderr
|
||||
process = subprocess.run(
|
||||
cmd,
|
||||
stdin=subprocess.DEVNULL,
|
||||
# stdout=subprocess.STDOUT,
|
||||
# stderr=subprocess.STDOUT,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
shell=True,
|
||||
check=False,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -173,6 +173,8 @@ class ReHoEstimator:
|
|||
reho_process = subprocess.run(
|
||||
reho_cmd_str, # string needed with shell=True
|
||||
stdin=subprocess.DEVNULL,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
shell=True, # needed for respecting $PATH
|
||||
check=False,
|
||||
)
|
||||
|
|
@ -205,6 +207,8 @@ class ReHoEstimator:
|
|||
convert_process = subprocess.run(
|
||||
convert_cmd_str, # string needed with shell=True
|
||||
stdin=subprocess.DEVNULL,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.STDOUT,
|
||||
shell=True, # needed for respecting $PATH
|
||||
check=False,
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue