Detecting line endings

Fuzzyman fuzzyman at gmail.com
Wed Feb 8 06:34:20 EST 2006


Alex Martelli wrote:
> Fuzzyman <fuzzyman at gmail.com> wrote:
>    ...
> > > Open the file with 'rU' mode, and check the file object's newline
> > > attribute.
> >

Just to confirm, for a UTF16 encoded file, the newlines attribute is
``None``.

All the best,

Fuzzyman
http://www.voidspace.org.uk/python/index.shtml




More information about the Python-list mailing list