通信機能を 2 回実行すると、このエラーが発生する理由を誰か説明できますか?
例えば
from subprocess import *
SVN=Popen('which svn', shell=True, stdout=PIPE)
print SVN.communicate()[0]
戻り値
"/usr/bin/svn"
しかし、再び通信を実行しています...
print SVN.communicate()[0]
戻り値...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 746, in communicate
stdout = _eintr_retry_call(self.stdout.read)
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 478, in _eintr_retry_call
return func(*args)
ValueError: I/O operation on closed file