2024-05-16 05:29:05 发布
网友
我想用python运行mplayer,下面是我的代码
from subprocess import call call (mplayer /root/Desktop/file.mp4)
但它不起作用,我犯了这个错误
我做错什么了?
您需要使用shell=False传递一个参数列表(默认值):
call(["mplayer", "/root/Desktop/file.mp4"])
或者对于单个字符串,您需要shell=True:
但是没有必要使用后者,第一种会很好地工作。在
您需要使用shell=False传递一个参数列表(默认值):
或者对于单个字符串,您需要shell=True:
^{pr2}$但是没有必要使用后者,第一种会很好地工作。在
相关问题 更多 >
编程相关推荐