This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pakal
Recipients pakal
Date 2008-10-24.15:23:16
SpamBayes Score 0.00033734762
Marked as misclassified No
Message-id <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za>
In-reply-to
Content
I've created on my desktop a file flooder.py containing just the following:
##################
import sys, os

progress=open(r"C:\Users\v-pascha\Desktop\STDERR.txt","w")

for i in range(101):
   print str(i)*20
   progress.write( str(i)+"\n" )
   
progress.close()
##################


and a file receiver.py containing just :


################
import sys, os, subprocess

#os.system("pause")
subprocess.Popen(r"python
C:\Users\v-pascha\Desktop\flooder.py",stdin=subprocess.PIPE,stdout=subprocess.PIPE)
#,stdin=subprocess.PIPE,stdout=subprocess.PIPE
#os.system("pause")

#####################

And when I launch receiver.py, I get a crash with that (not explicit)
message :
"close failed in file object destructor:
Error in sys.excepthook:

Original exception was:"

The crash doesn't happen if I don't redirect the stdout and stdin of the
child process. So it seems something weird happens when subprocess tries
to redirect the child's I/O to the PIPEs...
History
Date User Action Args
2008-10-24 15:23:21pakalsetrecipients: + pakal
2008-10-24 15:23:20pakalsetmessageid: <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za>
2008-10-24 15:23:18pakallinkissue4192 messages
2008-10-24 15:23:17pakalcreate