Calling external programs: ioredirection

Thaddeus L. Olczyk olczyk at interaccess.com
Wed Jun 7 09:36:06 EDT 2000


Sorry for being very brief and sctech, but my ISP news server is
flakey right now. I can post now but maybe not in ten minutes.

I want to to be able to call external programs and read their output.
For example: I might want to call grep and look at the results one by
one. 

I want to do this in order to do things similar to sh. For example:

wc -l *.h *.cpp|awk 'begin int i=0; {i+=$1 } end print i;}'

( I know the script is probably wrong, but you get the idea. )

Any idea of how?



More information about the Python-list mailing list