擅长:python、mysql、java
<p>你为什么要分开指挥?不要使用命令拆分(). 试试这个:</p>
<pre><code>import subprocess
cmd = "/usr/atria/bin/cleartool setview -exec '/usr/bin/python /home/testUser/Development/Scripts/setDoneFlag_Count_Lines.py' testUser__project_5_0_myProject_001"
p=subprocess.Popen([cmd], stdout=subprocess.PIPE,shell=True)
out, err = p.communicate()
print out
</code></pre>