擅长:python、mysql、java
<p>试试这个:</p>
<pre><code>p = subprocess.Popen(command,
shell = True, #is this even needed?
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
# stderr = subprocess.STDOUT #uncomment if reqd
)
</code></pre>
<p>使用<code>ping</code>命令在Windows上进行了测试。这让您可以<code>communicate</code>,这可能有助于您找出脚本最初没有启动的原因:)</p>