[issue967934] csv module cannot handle embedded \r
Daniel Diniz
report at bugs.python.org
Sat Feb 14 14:56:30 CET 2009
Daniel Diniz <ajaksu at gmail.com> added the comment:
IIUC, I get the correct behavior:
trunk-py$ ./python ~/Desktop/tcsv.py
['fld1', 'fld2', 'fld3 ', 'fld4']
['fld1', 'fld2', 'fld3 \r', 'fld4']
trunk-py$ cat ~/Desktop/tcsv.py
#! /usr/local/bin/python
import csv
d = 'fld1,fld2,"fld3 ",fld4\r\n'
d2 = 'fld1,fld2,"fld3 \r'
d3 = '",fld4\r\n'
r = csv.reader([d, d2, d3], dialect="excel")
for f in r:
print f
----------
components: +Extension Modules
dependencies: +CSV regression in 2.5a1: multi-line cells
nosy: +ajaksu2
stage: -> test needed
type: -> behavior
versions: +Python 2.6
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue967934>
_______________________________________
More information about the Python-bugs-list
mailing list