jaywalker added the comment:
I think what you suggest makes most sense.
Thanks.
- Original Message
From: Antoine Pitrou
To: jaywal...@yahoo.com
Sent: Monday, January 5, 2009 12:47:21 PM
Subject: [issue4847] csv fails when file is opened in binary mode
Antoine Pitrou added the
jaywalker added the comment:
make it '\r\n', if you want. Such files can be easily generated on windows text
editors, or even linux ones nowadays. Upon reading, if the file is opened in
text mode, this will probably be converted to \n even on linux by python (I may
be wrong). Thu
jaywalker added the comment:
In an unlikely scenario:
say one of the fields has an embedded \r. For instance "blahblah\r" is the
value of the first column. Now open this file in text mode. What happens to
this '\r' even before csv.reader sees it? If it remains intact, n
New submission from jaywalker :
The following code from the documentation fails:
#
import csv
reader = csv.reader(open("eggs.csv", "rb"))
for row in reader:
print(row)
#
The output is:
Traceback (most recent call last):
File &q