因此我正在写这个py程序。
import subprocess
string="ihateminority.py"
process=subprocess.Popen(string,stdin=subprocess.PIPE,stdout=subprocess.PIPE)
res=process.communicate("3 5")
print res[0]
我得到了这个窗口错误。
http://oi59.tinypic.com/xkvwx1.jpg/
显然,错误来自图书馆,而不是我。无论如何要解决这个问题,或者只是简单地避免id。 (我不能使用外部库)
答案 0 :(得分:0)
那是因为" ihateminority.py"不是有效的Win32应用程序。你应该调用" python.exe"传递它" ihateminority.py"作为一个论点。