[Pythonmac-SIG] Re: [Python-Dev] Import hook to do end-of-line conversion?

Greg Ewing greg@cosc.canterbury.ac.nz
Tue, 10 Apr 2001 12:29:42 +1200 (NZST)


Disregard what I just said. The problem isn't about reading
text files at all, it's about reading non-text files without
explicitly opening them in binary mode.

I think the trouble is with the idea that if you don't
specify the mode explicitly it defaults to text mode, which
on Unix just happens to be the same as binary mode.

Could we change that so binary mode is the default on
Unix, and if you want any line ending translation, you
have to specify text mode explicitly? Is there any standard
which says that text mode must be the default?

Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg@cosc.canterbury.ac.nz	   +--------------------------------------+