It's been a year or so since I written Python code, so maybe
I am just doing something really dumb, but...

Documentation
=============

        class DictReader(csvfile[,fieldnames=None,
              [,restkey=None[, restval=None[, dialect='excel'
              [, *args, **kwds]]]]])


        Create an object which operates like a regular reader
        but maps the information read into a dict whose keys
        are given by the optional fieldnames parameter. If the
        fieldnames parameter is omitted, the values in the
        first row of the csvfile will be used as the fieldnames.

Code
====

        import csv

        r = csv.DictReader('C:\Temp\Book1.csv')
        print r.next()
        # EOF

Output
======

        {'C': ':'}
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to