Message75169
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... |
|
Date |
User |
Action |
Args |
2008-10-24 15:23:21 | pakal | set | recipients:
+ pakal |
2008-10-24 15:23:20 | pakal | set | messageid: <1224861800.81.0.399738040895.issue4192@psf.upfronthosting.co.za> |
2008-10-24 15:23:18 | pakal | link | issue4192 messages |
2008-10-24 15:23:17 | pakal | create | |
|