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

Just van Rossum just@letterror.com
Sat, 14 Apr 2001 19:54:54 +0200


M.-A. Lemburg wrote:

> Just curious: for the applications which Just has in mind,
> reading source code line-by-line is not really needed. Wouldn't
> it suffice to read the whole file, split it into lines and then
> let the tools process the resulting list of lines ?
> 
> Maybe a naive approach, but one which will most certainly work
> on all platforms without having to replace stdio...

The point is to let existing tools work with all line end conventions *without*
changing the tools. Whether this means replacing stdio I still don't know
<wink>, but it sure means changing the behavior of the Python file object in
text mode.

Just