"shell-commands" and python!

Donn Cave donn at drizzle.com
Sat Sep 22 01:25:27 EDT 2001


Quoth Ignacio Vazquez-Abrams <ignacio at openservices.net>:
| 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.

You know, you don't have to answer every question to comp.lang.python.
When you do choose to answer one, please don't abuse the original poster
when he points out the deficiencies of your answer.

	Donn Cave, donn at drizzle.com



More information about the Python-list mailing list