<skip <at> pobox.com> writes: > > Antoine> The documentation is, IMO, wrong even in 2.x. Just yesterday I > Antoine> had to open a CSV file in 'rU' mode because it had Windows line > Antoine> endings and I'm under Linux.... > > See above. You almost certainly didn't have fields containing CRLF pairs or > didn't care that while reading the file your data values were silently > altered.
Perhaps. But without using 'rU' the file couldn't be read at all. (I'm not sure it was Windows line endings by the way; perhaps Macintosh ones; anyway, it didn't work using 'rb') I have to add that if individual fields really can contain newlines, then the CSV module ought to be smarter when /saving/ those fields. I've inadvertently tried to produce a CSV file with such fields and it ended up wrong when opened as a spreadsheet (text after the newlines was ignored in Gnumeric and in OpenOffice, while Excel displayed a spurious additional row containing only the text after the newline). Regards Antoine. _______________________________________________ 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