与“”相比,子进程调用提供了不正确的参数。join()

2024-05-15 22:27:08 发布

您现在位置:Python中文网/ 问答频道 /正文

当我运行命令时

subprocess.call(['intersectBed','-u','-a',out_snv_filter,'-b',cds,'>',out_cds],shell=True)

我得到解释器中报告的intersectBed的帮助菜单。在

但当我跑的时候

^{pr2}$

程序运行正常。这有什么区别?在


Tags: 命令程序运行true报告菜单shellcallfilter
1条回答
网友
1楼 · 发布于 2024-05-15 22:27:08
from subprocess import check_call

args = ['intersectBed','-u','-a',out_snv_filter,'-b',cds]
with open(out_cds, 'wb') as outfile:
    check_call(args, stdout=outfile)

相关问题 更多 >