Fuzzyman wrote: > Alex Martelli wrote: > > Fuzzyman <[EMAIL PROTECTED]> 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``. >
Hmmm... having read the documentation, the newlines attribute remains None until some newlines are encountered. :oops: I don't think it's technique is any better than mine though. ;-) Fuzzy http://www.voidspace.org.uk/python/index.shtml > All the best, > > Fuzzyman > http://www.voidspace.org.uk/python/index.shtml -- http://mail.python.org/mailman/listinfo/python-list