stdin / stdout doubts..

Alessio Pace puccio_13 at yahoo.it
Fri May 2 10:28:17 EDT 2003


Hi, I have some doubts about the way I deal with stdin and stdout.
I do:
import sys

multi_line_text = sys.stdin.read()      
# do something on the text
# ...
sys.stdout.write(modified_multi_line_text)

Is this the preferable way? Or is there another way to make Python read from
stdin/write to stdout

-- 
bye
Alessio Pace




More information about the Python-list mailing list