小编use*_*173的帖子

Python:子进程并运行带有多个参数的bash脚本

如何使用子进程模块运行bash脚本,我必须给出几个参数?

这就是我目前使用的:

subprocess.Popen(['/my/file/path/programname.sh', 'arg1 arg2 %s' % arg3], \
    shell = True)
Run Code Online (Sandbox Code Playgroud)

bash脚本似乎没有采用任何参数.任何见解都非常感谢!

python bash arguments subprocess popen

26
推荐指数
2
解决办法
6万
查看次数

标签 统计

arguments ×1

bash ×1

popen ×1

python ×1

subprocess ×1