"shell-commands" and python!

Greg Weeks weeks at vitus.scs.agilent.com
Fri Sep 21 15:58:56 EDT 2001


Ignacio Vazquez-Abrams (ignacio at openservices.net) wrote:
: On Fri, 21 Sep 2001, Greg Weeks wrote:

: >     <  >  >>  2>  2>>  2>&1		# REDIRECTION

: popen(..., 'w'), popen(..., 'r'), popen(..., 'r'), popen3(...),
: popen3(...), popen4(...)

This has a problem.  For example, to redirect output to a file, I need to
read it from the pipe stream and write it to the file stream myself.  If I
want this to happen as the text is generated, I need a separate thread to
"weld" together the pipe stream and the file stream.  That is a good deal
clunkier (and less efficient) than is available using Ksh.

Greg



More information about the Python-list mailing list