![]() |
| ||
| Opening pipelines with python ? In the Perl language, you can fork a child process with the following syntax open CHILD, " | programA | programB | program C";(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 ? |
| ||
| Re: Opening pipelines with python ? You can use subprocess with shell on unix. http://blog.doughellmann.com/2007/07...ubprocess.html And http://www.python.org/doc/current/li...ubprocess.html |
| ||
| Re: Opening pipelines with python ? Thanks, it works very well this way import subprocess |
| ||
| Re: Opening pipelines with python ? Thanks for the feedback. |
| All times are GMT -4. The time now is 1:32 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC