Added python execution path in config file

This commit is contained in:
Ganesh Gore 2019-08-25 00:42:48 -06:00
parent f558437ae1
commit 632c9d6976
2 changed files with 8 additions and 3 deletions

View File

@ -1,4 +1,5 @@
[GENERAL CONFIGURATION]
task_dir=${PATH:OPENFPGA_PATH}/openfpga_flow/tasks
misc_dir=${PATH:OPENFPGA_PATH}/openfpga_flow/misc
python_path=python3.5
script_default=${PATH:OPENFPGA_PATH}/openfpga_flow/scripts/run_fpga_flow.py

View File

@ -326,9 +326,13 @@ def run_single_script(s, eachJob):
try:
logfile = "%s_out.log" % name
with open(logfile, 'w+') as output:
process = subprocess.Popen(["python3.5",
gc["script_default"]] +
eachJob["commands"],
output.write("* "*20 + '\n')
output.write("RunDirectory : %s\n" % os.getcwd())
command = [gc["python_path"], gc["script_default"]] + \
eachJob["commands"]
output.write(" ".join(command) + '\n')
output.write("* "*20 + '\n')
process = subprocess.Popen(command,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
universal_newlines=True)