how do I pipe two processes?
Michele Simionato
michele.simionato at gmail.com
Thu Feb 1 06:15:31 EST 2007
More information about the Python-list mailing list
Thu Feb 1 06:15:31 EST 2007
- Previous message (by thread): how do I pipe two processes?
- Next message (by thread): Random passwords generation (Python vs Perl) =)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Feb 1, 10:12 am, Bilgehan.Bal... at gmail.com wrote: > Hi, I want to pipe output of process A to B, and read output of B from > python. On Unix if I do the following: > > child_out, child_in = popen2("program_a | program_b") > > line = child_out.readline() > > I get "IOError: bad file descriptor" from Python, and broken pipe > error from program_b. How do I do this right? > > Thanks, > Bahadir Use the subprocess module, see the examples here: http://docs.python.org/dev/lib/node539.html Michele Simionato
- Previous message (by thread): how do I pipe two processes?
- Next message (by thread): Random passwords generation (Python vs Perl) =)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list