Is anyone happy with csv module?

Neil Cerutti horpner at yahoo.com
Wed Dec 12 08:58:50 EST 2007


On 2007-12-11, massimo s. <devicerandom at gmail.com> wrote:
> Hi,
>
> I'm struggling to use the python in-built csv module, and I
> must say I'm less than satisfied. Apart from being rather
> poorly documented, I find it especially cumbersome to use, and
> also rather limited. What I dislike more is that it seems
> working by *rows* instead than by *columns*.

It is very *thoroughly* documented, which is a style that won't
suit every purpose.

> So I have some questions:
> 1) Is there a good tutorial, example collection etc. on the csv
> module that I'm missing?

Just skip to 9.1.5 Examples, and you'll be on your way.

> 2) Is there an alternative csv read/write module?

There are other ways to tackle the data, for example, using an
csv ODBC apaptor. That may or may not seem like an easy solution
to you. It certainly doesn't suit me.

> 3) In case anyone else is as unhappy as me, and no tutorial
> etc. enlighten us, and no alternative is present, anyone is
> interested in an alternative csv module? I'd like to write one
> if it is the case.

I was intimidated by it at first, implemented my own reader
(mostly as a fun parsing exercise), used that for a while, and
then threw it out.

I advise you to spend time staring at the examples, and use the
simplest example the suits your needs. Also search this archives
of this group for examples.

-- 
Neil Cerutti
The pastor will preach his farewell message, after which the choir will sing,
"Break Forth Into Joy." --Church Bulletin Blooper



More information about the Python-list mailing list