A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-January/050960.html below:

[Python-Dev] Re: [Csv] csv module and universal newlines

[Python-Dev] Re: [Csv] csv module and universal newlinesJack Jansen Jack.Jansen at cwi.nl
Thu Jan 13 00:02:39 CET 2005
On 12-jan-05, at 2:59, Skip Montanaro wrote:
>     terminators = {"darwin": "\r",
>                    "win32": "\r\n"}
>
>     if (dialect.lineterminator != terminators.get(sys.platform, "\n") 
> and
>        "b" not in getattr(f, "mode", "b")):
>        raise IOError, ("%s not opened in binary mode" %
>                        getattr(f, "name", "???"))

On MacOSX you really want universal newlines. CSV files produced by 
older software (such as AppleWorks) will have \r line terminators, but 
lots of other programs will have files with normal \n terminators.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma 
Goldman

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4