[issue2078] CSV Sniffer does not function properly on single column .csv files
Jean-Philippe Laverdure
report at bugs.python.org
Thu Mar 27 21:39:03 CET 2008
Jean-Philippe Laverdure <jp.laverdure at gmail.com> added the comment:
Hi Skip,
You're right, it does seem that using f.read(1024) to feed the sniffer
works OK in my case and allows me to instantiate the DictReader
correctly... Why that is I'm not sure though...
I was submitting the first line as I thought is was the right sample to
provide the sniffer for it to sniff the correct dialect regardless of
the file format and file content.
And yes, 'except csv.Error' is certainly a better way to trap my desired
exception... I guess I'm a bit of a n00b using Python.
Thanks for the help.
Python really has a great community !
__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue2078>
__________________________________
More information about the Python-bugs-list
mailing list