python库

subprocess

2017-12-08  本文已影响2人  梁新彦
 retcode = call(["ls", "-l"])

Run command with arguments. Wait for command to complete or timeout, then return the return code attribute. The arguments are the same as for the Popen constructor.

from subprocess import call

src = train_or_test + '/' + classname + '/' + filename
 dest = train_or_test + '/' + classname + '/' +  filename_no_ext + '-%04d.jpg'
call(["ffmpeg", "-i", src, dest])
上一篇下一篇

猜你喜欢

热点阅读