[Python-3000] sys.stdin and sys.stdout with textfile

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Sep 12 05:34:42 CEST 2006

Guido van Rossum wrote:

> All sorts of things are different when reading stdin vs. opening a
> filename. e.g. stdin may be a pipe.

Which suggests that if anything is going to try
to guess the encoding, it would be better for it
to start reading from the actual stream you're
going to use and buffer the result, rather than
rely on being able to open it separately.

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | Carpe post meridiem!          	  |
Christchurch, New Zealand	   | (I'm not a morning person.)          |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+

More information about the Python-3000 mailing list