[New-bugs-announce] [issue5975] csv unix file format ('\n' line terminator)
report at bugs.python.org
Sat May 9 00:31:10 CEST 2009
New submission from Jay Talbot <jay.talbot at gmail.com>:
I was having issues importing a csv file generated by the csv.write
class with the following:
load data infile 'file.csv' replace into table en fields terminated by
',' enclosed by '"' lines terminated by '\r\n';
To help prevent this from happening again, I would like to see the
following added to the csv.py library:
"""Describe the usual properties of unix-generated CSV files."""
delimiter = ','
quotechar = '"'
doublequote = True
skipinitialspace = False
lineterminator = '\n'
quoting = QUOTE_ALL
The above code is the excel class dialect with '\n' line termination and
quoting of all fields. This allows for easy csv file import into mysql
components: Library (Lib)
title: csv unix file format ('\n' line terminator)
type: feature request
versions: Python 2.5, Python 2.6, Python 3.0
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce