图书馆子流程抛出Windows错误

2024-09-29 19:28:40 发布

您现在位置:Python中文网/ 问答频道 /正文

所以我写了这个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(我不能使用外部库)


Tags: pyimport程序string错误stdinstdoutres
1条回答
网友
1楼 · 发布于 2024-09-29 19:28:40

那是因为”ihateminority.py文件“”不是有效的Win32应用程序。“你应该打电话”python.exe“把它传过来”ihateminority.py文件“作为论据。你知道吗

相关问题 更多 >

    热门问题