[issue37709] CSVReader ignores dialect.lineterminator

2021-10-20 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: open -> closed superseder: -> Close 2to3 issues and list them here ___ Python tracker ___

[issue37709] CSVReader ignores dialect.lineterminator

2020-07-21 Thread Daniel Smejkal
Change by Daniel Smejkal : -- assignee: -> docs@python components: +2to3 (2.x to 3.x conversion tool), Documentation, email nosy: +barry, docs@python, r.david.murray ___ Python tracker __

[issue37709] CSVReader ignores dialect.lineterminator

2019-07-30 Thread Skip Montanaro
Change by Skip Montanaro : Added file: https://bugs.python.org/file48522/lfmapper.py ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue37709] CSVReader ignores dialect.lineterminator

2019-07-30 Thread Skip Montanaro
Skip Montanaro added the comment: Looking at your sample file, it seems stranger than you first indicated. Your line terminator actually appears to be '\x07\r\n', not just '\x07'. Opening your file in text mode will leave you with '\x07' as the last character of the last cell in each row. I

[issue37709] CSVReader ignores dialect.lineterminator

2019-07-30 Thread Benjamin Schollnick
Benjamin Schollnick added the comment: This is tested under python 3... filename = "csv_Sample.csv" from csv import DictReader datafile = open(filename, 'r') data = csv.DictReader(datafile, lineterminator = '\x07', delimiter='\x06') print(next(data)) OrderedDict([('Field1', 'A'), ('Field2'

[issue37709] CSVReader ignores dialect.lineterminator

2019-07-29 Thread Skip Montanaro
Skip Montanaro added the comment: I imagine this is a corner case which will continue to cause problems. At the time the csv module was originally written, I believe the authors' intent was to read and write CSV files which were compatible with Excel. In Python 3, you have to open input file

[issue37709] CSVReader ignores dialect.lineterminator

2019-07-29 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Seems related : https://bugs.python.org/issue1072404 . There is a note on docs that it's ignored and may be changed in future. https://docs.python.org/3/library/csv.html -- nosy: +skip.montanaro, xtreak

[issue37709] CSVReader ignores dialect.lineterminator

2019-07-29 Thread Benjamin Schollnick
New submission from Benjamin Schollnick : I've run into a situation where the CSV input file is very unusual. The Delimiter is "\x06" and the lineterminator is "\x07". While I've written code to work around this, it would be significantly nicer if the CSV Reader code actually paid attention