bc823da8c38eae03a311d0ba0627b23b84939b56,src/sos/actions.py,SoS_ExecuteScript,run,#SoS_ExecuteScript#,205
Before Change
if err and env.verbosity > 0:
sys.stderr.write(err.decode())
ret = p.returncode
sys.stdout.flush()
sys.stderr.flush()
elif "__std_out__" in env.sos_dict and "__std_err__" in env.sos_dict:
if env.verbosity > 1:
with open(env.sos_dict["__std_out__"], "ab") as so, open(env.sos_dict["__std_err__"], "ab") as se:
After Change
if env.config["run_mode"] == "interactive":
// need to catch output and send to python output, which will in trun be hijacked by SoS notebook
import pexpect
try:
if isinstance(cmd, str):
child = pexpect.spawn(cmd, timeout=None)
else:
child = pexpect.spawn(subprocess.list2cmdline(cmd), timeout=None)
while True:
try:
child.expect("\n")
if env.verbosity > 0:
sys.stdout.write(child.before.decode() + "\n")
except pexpect.EOF:
break
except Exception as e:
sys.stderr.write(str(e))
// NOTE:
// because of the use of pexpect, we do not know the
// return code of the process at all.
ret = 0
elif "__std_out__" in env.sos_dict and "__std_err__" in env.sos_dict:
if env.verbosity > 1:
with open(env.sos_dict["__std_out__"], "ab") as so, open(env.sos_dict["__std_err__"], "ab") as se:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: vatlab/SoS
Commit Name: bc823da8c38eae03a311d0ba0627b23b84939b56
Time: 2017-07-30
Author: ben.bog@gmail.com
File Name: src/sos/actions.py
Class Name: SoS_ExecuteScript
Method Name: run
Project Name: ilastik/ilastik
Commit Name: e25820e17e9aad85d4fadade73e94c68b67f9b7a
Time: 2012-07-30
Author: bergs@janelia.hhmi.org
File Name: ilastik/shell/projectManager.py
Class Name: ProjectManager
Method Name: saveProject
Project Name: nilearn/nilearn
Commit Name: a0d70d5a13d771ba944b4cf2a1c32226eafa393b
Time: 2015-11-04
Author: alexandre.abadie@inria.fr
File Name: nilearn/tests/test_numpy_conversions.py
Class Name:
Method Name: test_csv_to_array