[英]Execute multiple command lines with multiple arguments
我不明白為什么我的命令行不起作用。 我試過
subprocess.Popen()` function : `Popen('C:/Test/test.exe -scan "C:/Users/Vince/test.txt" "C:/Users/Vince/test.xml"', cwd='C:/Users/Vince/Working_Directory')
但是,當我使用os.system("E:/test.bat")
從 Python 程序運行批處理文件時,它會起作用。
這是我的批處理文件的內容:
C:
cd Users\Vince\Working_Directory
C:\Test\test.exe -scan "C:\Users\Vince\test.txt" "C:\Users\Vince\test.xml"
可能在Popen
中將/
更改為\\\\
可以提供幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.