import pickle
import subprocess
+# OP
+import src
+
def show_progress(logger, top, delai, ss=""):
"""shortcut function to display the progression
logger.write("launch: %s\n" % cmd, 5, screenOnly=True)
for arg in args:
cmd += " " + arg
- prs = subprocess.Popen(cmd,
+
+ # OP Add Windows case
+ if src.architecture.is_windows():
+ prs = subprocess.Popen(cmd,
+ shell=True,
+ stdout=log,
+ stderr=subprocess.STDOUT,
+ cwd=cwd)
+ pass
+ else:
+ prs = subprocess.Popen(cmd,
shell=True,
stdout=log,
stderr=subprocess.STDOUT,
cwd=cwd,
executable='/bin/bash')
+ pass
+ # END OP
return prs
# Launch a batch
# stdout=subprocess.PIPE,
# shell=True,
# executable='/bin/bash').communicate()[0].split()[-1]
- subproc_res = subprocess.Popen(cmd,
+ # OP Add Windows case
+ if src.architecture.is_windows():
+ subproc_res = subprocess.Popen(cmd,
+ stdout=subprocess.PIPE,
+ shell=True).communicate()
+ pass
+ else:
+ subproc_res = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
shell=True,
executable='/bin/bash').communicate()
+ pass
#print "TRACES OP - test_module.py/Test.get_tmp_dir() subproc_res = "
- for resLine in subproc_res:
- print "- '#%s#'" %resLine
+ #for resLine in subproc_res:
+ # print "- '#%s#'" %resLine
root_dir = subproc_res[0].split()[-1]