Detecting line endings

Alex Martelli aleaxit at yahoo.com
Tue Feb 7 10:51:30 EST 2006


Fuzzyman <fuzzyman at gmail.com> wrote:
   ...
> > Open the file with 'rU' mode, and check the file object's newline
> > attribute.
> 
> Do you know if this works for multi-byte encodings ? Do files have

You mean when you open them with the codecs module?

> metadata associated with them showing the line-ending in use ?

Not in the filesystems I'm familiar with (they did use to, in
filesystems used on VMS and other ancient OSs, but that was a very long
time ago).


Alex



More information about the Python-list mailing list