In the Perl language, you can fork a child process with the following syntax
open CHILD, " | programA | programB | program C";
print CHILD "this is an example input";
(at least, you can do this under linux). This statement starts 3 processes in fact; programA, B and C. Moreover, the stdout of A is piped to the stdin of B and the stdout of B is piped to the stdin of C, forming a pipeline. Since the command starts, with a "|", CHILD is a pipe through which your program can write in the stdin of A.
I'd like to know if a similar construct exists for python, or, suppose I want to achieve the same effect with python, what would be the best way to do it ?
Last edited by Gribouillis; Aug 15th, 2008 at 7:40 pm.
Reputation Points: 930
Solved Threads: 666
Posting Maven
Offline 2,655 posts
since Jul 2008