擅长:python、mysql、java
<p>您有几个选项可以通过<code>shell=True</code>:</p>
<pre><code>Popen('command1 | command2 | command3',shell=True)
</code></pre>
<p>或者,您可以将其分解为一组<code>Popen</code>调用,将它们的stdout挂接到下一个Popen的stdin,如<a href="http://docs.python.org/2/library/subprocess.html#replacing-shell-pipeline">documentation</a>所示。在</p>