Issue 5975: csv unix file format ('\n' line terminator) (original) (raw)
Issue5975
Created on 2009-05-08 22:31 by jtalbot, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (4) | ||
---|---|---|
msg87479 - (view) | Author: Jay Talbot (jtalbot) | Date: 2009-05-08 22:31 |
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: class unix_dialect(Dialect): """Describe the usual properties of unix-generated CSV files.""" delimiter = ',' quotechar = '"' doublequote = True skipinitialspace = False lineterminator = '\n' quoting = QUOTE_ALL register_dialect("unix_dialect", unix_dialect) 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 databases. | ||
msg87830 - (view) | Author: Terry J. Reedy (terry.reedy) * ![]() |
Date: 2009-05-15 20:23 |
New features must be targeted at 2.7/3.2. 2.5 is in security-fix only mode and 2.6 in bug-fix only mode, as is 3.0. 3.1 is in beta with new features pretty well frozen. | ||
msg87841 - (view) | Author: Jay Talbot (jtalbot) | Date: 2009-05-15 21:45 |
I'm sorry. I will remember to try and look up where the new features are being targeted. Reporting bugs and requesting new features here is new to me. Everyone seems to have their own rules. | ||
msg119678 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2010-10-27 07:27 |
Added in r85856. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:48 | admin | set | github: 50225 |
2010-10-27 07:27:23 | georg.brandl | set | status: open -> closednosy: + georg.brandlmessages: + resolution: fixed |
2009-05-15 21:45:08 | jtalbot | set | messages: + |
2009-05-15 20:23:27 | terry.reedy | set | nosy: + terry.reedymessages: + versions: + Python 2.7, Python 3.2, - Python 2.6, Python 2.5, Python 3.0 |
2009-05-08 22:31:08 | jtalbot | create |