Email Re: [Python-projects] Check imported modules attributes

to
Sylvain Thenault <syt at logilab dot fr>
subject
Re: [Python-projects] Check imported modules attributes
date
2005/06/21 18:16

> > You way want to look at the universal newline feature of Python,
> > depending on how the files are opened in pylint: using mode "U" to open
a
> > file object should convert all kind of newlines to \n (requires
> > python >= 2.2). Check the builtin file() function for more information
> > on this.
>
> hum, pylint is already doing so...

So the error lies in the use of os.linesep.
Once the text is correctly loaded into memory, \n is the
only line separator.

os.linesep should be used only when parsing binary files.

--
Amaury Forgeot d'Arc
Ubix Development
www.ubitrade.com