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, <[EMAIL PROTECTED]>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma Goldman
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com