Suppose I have a file RegressionSystem.exe
. I want to execute this executable with a -config
argument. The commandline should be like:
RegressionSystem.exe -config filename
I have tried like:
regression_exe_path = os.path.join(get_path_for_regression,'Debug','RegressionSystem.exe')
config = os.path.join(get_path_for_regression,'config.ini')
subprocess.Popen(args=[regression_exe_path,'-config', config])
but it didn't work.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…