"shell-commands" and python!

Ignacio Vazquez-Abrams ignacio at openservices.net
Fri Sep 21 16:12:53 EDT 2001


On Fri, 21 Sep 2001, Greg Weeks wrote:

> 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.

Would you like some cheese with that whine?

If you feel that ksh is the correct tool for the job, then by all means feel
free to use ksh. If you would rather use Python for it, then use Python and
stop complaining.

-- 
Ignacio Vazquez-Abrams  <ignacio at openservices.net>





More information about the Python-list mailing list