将参数作为列表传递,请参阅docs中的第一个代码示例:
import subprocesssubprocess.check_call(['/my/file/path/programname.sh', 'arg1', 'arg2', arg3])
如果
arg3不是字符串;在传递到
check_call():之前将其转换为字符串
arg3 = str(arg3)。

将参数作为列表传递,请参阅docs中的第一个代码示例:
import subprocesssubprocess.check_call(['/my/file/path/programname.sh', 'arg1', 'arg2', arg3])
如果
arg3不是字符串;在传递到
check_call():之前将其转换为字符串
arg3 = str(arg3)。