subprocess -- broken pipe error

7stud bbxx789_05ss at yahoo.com
Mon Jul 2 13:12:30 EDT 2007


Hi,

Can someone explain what a broken pipe is?  The following produces a
broken pipe error:

----------
import subprocess as sub

p = sub.Popen(["ls", "-al", "../"], stdin=sub.PIPE, stdout=sub.PIPE)

print p.stdout.read()
#outputs the files correctly

p.stdin.write("ls\n")
#IOError: [Errno 32] Broken pipe
-----------




More information about the Python-list mailing list