[issue4192] Subprocess error with I/O redirection to Pipes

2009-03-05 Thread Pascal Chambon
Pascal Chambon chambon.pas...@gmail.com added the comment: Thansk a lot for reviewing the problem Indeed, p.wait() seems to do the trick in this case. Is there any global way to avoid such pipe problems ? I mean, in any case, one end of each pipe has to be closed before the other end, so such

[issue4192] Subprocess error with I/O redirection to Pipes

2009-03-04 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: Probably this happens because receiever.py doesn't wait for flooder.py termination, and pipe end is closed when recieiver.py terminates. Does this code work for you? p = subprocess.Popen(python

[issue4192] Subprocess error with I/O redirection to Pipes

2009-03-04 Thread Hirokazu Yamamoto
Hirokazu Yamamoto ocean-c...@m2.ccsnet.ne.jp added the comment: This happens because when flooder.py terminates, its stdout will be closed, but another pipe end in receirver.py process is already closed, so Python\sysmodule.c(1098): _check_and_flush (FILE *stream) In this function, fflush()

[issue4192] Subprocess error with I/O redirection to Pipes

2008-10-24 Thread Pascal Chambon
New submission from Pascal Chambon [EMAIL PROTECTED]: I've created on my desktop a file flooder.py containing just the following: ## import sys, os progress=open(rC:\Users\v-pascha\Desktop\STDERR.txt,w) for i in range(101): print str(i)*20 progress.write( str(i)+\n )