[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-15 Thread Василь Коломієць
Василь Коломієць added the comment: )) Thanks! Be happy! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Georg Brandl
Georg Brandl added the comment: Thanks! Now the reason is clear: You use csv.DictReader instead of csv.reader. csv.DictReader has a different argument list - for DictReader the second argument is `fieldnames`. -- ___ Python tracker

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
Changes by Василь Коломієць : Added file: http://bugs.python.org/file41620/CSV-ex.png ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
Василь Коломієць added the comment: I am very happy! Thx for attention to my opinion. Sorry for my english. so - in attachment two codes and source csv-file. With best wishes, Vasyl Kolomiets. +38050 45 22 559 2016-01-15 0:38 GMT+02:00 Georg Brandl : > > Georg Brandl added the comment: > > We

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Georg Brandl
Georg Brandl added the comment: We'll need at least the two full examples (one not working, one working) to make a call here. -- nosy: +georg.brandl ___ Python tracker ___ _

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
Василь Коломієць added the comment: Thanx a lot. And sorry. But with ..., dialect=dialect, the same code is working. . Ok. i'll try to understand. With best wishes - VK. С уважением, Василий Коломиец +38050 45 22 559 2016-01-15 0:18 GMT+02:00 SilentGhost : > > SilentGhost added the commen

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread SilentGhost
SilentGhost added the comment: Vasyl, this line in your code is causing the problem: for row in readed: The error reasonably clear states that it's due to your `fieldnames' parameter being non-iterable. Again, this has nothing whatsoever to do with `dialect' argument and documentation of

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
Василь Коломієць added the comment: Traceback (most recent call last): File "F:\Program Files (x86)\Pyton3_4\=Py\NovaPoshta\View#1-check-Trojan.py", line 11, in for row in readed: File "F:\Program Files (x86)\Pyton3_4\lib\csv.py", line 118, in __next__ d = dict(zip(self.fieldnames,

[issue26116] CSV-module. The example code don't work. Have to be: reader = csv.reader(csvfile, dialect=dialect)

2016-01-14 Thread Василь Коломієць
New submission from Василь Коломієць: with open('example.csv') as csvfile: dialect = csv.Sniffer().sniff(csvfile.read(1024)) csvfile.seek(0) reader = csv.reader(csvfile, dialect) # ... process CSV file contents here ... -- have to be: ... reader = csv.reader(csvfile, dial