【发布时间】:2019-12-19 20:17:18
【问题描述】:
我通常在 PowerShell 中运行命令:
cd C:\Users\aaa\Desktop\File Namee\
然后我正在执行带有特定参数的程序:
.\program.exe /F:aa.dvl /PPP_ZZZ
它有效,现在我的问题是,如何通过 python 脚本执行它?我尝试了 subprocess 和 os.system 但它对我不起作用。
file = ['C:\\Users\\aaa\\Desktop\\File Namee\\', '.program.exe/F:aa.dvl /PPP_ZZZ']
subprocess.call(file)
【问题讨论】:
-
查看answer。