CSV Module
Matthew Dixon Cowles
matt at mondoinfo.com
Sat Apr 24 18:27:08 EDT 1999
In article
<Pine.SUN.3.95-heb-2.07.990424203855.9433B-100000 at sunset.ma.huji.ac.il>,
Moshe Zadka <mzadka at geocities.com> wrote:
> I wonder if there is some standard module out there that can parse
> ``CSV'' files. Or, if anyone knows where the documentation of that format
> can be had.
>
> Here is my meek attempt at an answer. It is not certain to work, as I am
> not sure about the format -- I was guessing from looking at the file
[snip]
Moshe,
I'm pretty sure that there isn't a standard module since I had a look for
one a month or two ago and didn't find one. I ended up doing just what
you did -- hacking up something that worked on the file I needed to
convert. I have no idea if there's something in the spec that mine doesn't
take into account since I've never seen the spec. Mine will handle
double-quotes embedded in a field since there were some in the data I had
to parse.
In case it's of any interest to anyone, I've uploaded mine to my FTP site:
ftp://ftp.visi.com/users/mdc/csvsplit.py
Regards,
Matt
More information about the Python-list
mailing list