CSV Dialect Example Requested - NEWBIE
Vincent Marchetti
vincem at en.com
Tue Oct 28 06:09:11 EST 2003
In article <RJrnb.117433$a16.19895 at lakeread01>, "caldwellinva"
<caldwellinva at cox.net> wrote:
> Hi!
>
> ** CSV Dialect Example Requested - NEWBIE **
>
> I would like to use the CSV module and would like to see a working example
> that uses a custom dialect. I have tried the following example from an
> earlier posting to the group
>
> import csv
>
> import csv
> class dialect(csv.dialect):
> delimiter = '|'
> skipinitialspace = True
> quotechar = '"'
> doublequote = True
>
I do not have an example, but the first failure in this script is that the
class in the csv module that you want to use as a base class is
csv.Dialect (note case). This causes the attribute error you report.
Vince
More information about the Python-list
mailing list