cyr*_*ram 8 python subprocess popen
我有以下代码
pathToFile = "R:\T2 Output\12345--01--Some File 1--ABCD.mp4"
process = subprocess.Popen(['ffprobe.exe', '-show_streams', '"'+pathToFile+'"'],
shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Run Code Online (Sandbox Code Playgroud)
我收到错误:
[Error 2] The system cannot find the file specified
Run Code Online (Sandbox Code Playgroud)
我尝试过的:
注意事项:
我确定我错过了一些简单的事情.谁能指出我正确的方向?我已经在这个网站和其他人上做了很多搜索并尝试了一些建议.
该\符号在 python 中被视为转义字符,使用r可将其关闭:
pathToFile = r"R:\T2 Output\12345--01--Some File 1--ABCD.mp4"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4786 次 |
| 最近记录: |