Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #53632 > unrolled thread
| Started by | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| First post | 2013-09-04 10:32 -0500 |
| Last post | 2013-09-04 10:32 -0500 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Dealing with \r in CSV fields in Python2.4 Tim Chase <python.list@tim.thechases.com> - 2013-09-04 10:32 -0500
| From | Tim Chase <python.list@tim.thechases.com> |
|---|---|
| Date | 2013-09-04 10:32 -0500 |
| Subject | Re: Dealing with \r in CSV fields in Python2.4 |
| Message-ID | <mailman.49.1378308700.5461.python-list@python.org> |
On 2013-09-04 10:20, Skip Montanaro wrote:
> > _csv.Error: newline inside string
>
> How are the lines actually terminated, with \r\n or with just \n? If
> it's just \n, what happens if you specify \n as the line terminator?
Unfortunately, the customer feed contains DOS newlines ("\r\n").
I'm not quite sure what """
Note
The reader is hard-coded to recognize either '\r' or '\n' as
end-of-line, and ignores lineterminator. This behavior may change in
the future.
""" means at [1]. Does that mean that efforts to change the
lineterminator don't have any effect? Or that you can't (currently)
specify anything other than "\r" or "\n"? Though that is a bit
tangent to the actual issue.
-tkc
[1] http://docs.python.org/2/library/csv.html
Back to top | Article view | comp.lang.python
csiph-web