1) Run scripts on WINDOWS platform: use " & " as command separator (windows analog of the " ; " in linux);
2) Always run command in the format "PYTHONEXECUTABLE script.py args" even on Linux, because script.py may be without execute permission.
commands = []
for sc_dict in scriptArgs:
for script, sc_args in sc_dict.items(): # single entry
- cmd = script
+ cmd = "@PYTHONBIN@ " + script
if sc_args:
cmd = cmd + " " + " ".join(sc_args)
commands.append(cmd)
+ sep = " ; "
+ if sys.platform == "win32":
+ sep= " & "
+ command = sep.join(["%s"%x for x in commands])
+
command = "; ".join(["%s"%x for x in commands])
return command