发布时间:2019-08-27 08:00:38编辑:auto阅读(2299)
一,执行cmd并读取返回值
import subprocess
p = subprocess.Popen("ls",
stdout=subprocess.PIPE, universal_newlines=True)
p.wait()
result_lines = p.stdout.readlines()
for line in result_lines:
print(line)
二,执行cmd命令
import subprocess
cmd = "ffmpeg -i bb_short.mp4 -vf \"select=\'eq(pict_type, PICT_TYPE_I)\'\" -vsync vfr out%d.png"
p = subprocess.Popen(cmd, shell=True)
p.wait()
上一篇: python判断字符串(string)是
下一篇: python之打印机
50958
50341
40956
37825
32289
29179
28067
22896
22858
21191
1050°
1728°
1410°
1348°
1609°
1438°
2094°
3636°
3562°
2510°