相关疑难解决方法(0)

Python:执行shell命令

我需要这样做:

paste file1 file2 file3 > result
Run Code Online (Sandbox Code Playgroud)

我的python脚本中有以下内容:

from subprocess import call

// other code here.

// Here is how I call the shell command

call ["paste", "file1", "file2", "file3", ">", "result"])
Run Code Online (Sandbox Code Playgroud)

不幸的是我收到此错误:

paste: >: No such file or directory.

任何帮助都会很棒!

python subprocess

1
推荐指数
2
解决办法
387
查看次数

标签 统计

python ×1

subprocess ×1