This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: csv sniff example
Type: enhancement Stage:
Components: Documentation Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: georg.brandl, guettli, skip.montanaro
Priority: normal Keywords:

Created on 2007-03-22 22:04 by guettli, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg55051 - (view) Author: Thomas Guettler (guettli) * Date: 2007-03-22 22:04
Hi,

I think the csv module misses an example for the
nice sniff method:

import csv
dialect=csv.Sniffer().sniff(open(csvfile).read(1024))
fd=open(csvfile)
for row in csv.reader(fd, dialect):
    for col in row:
        print col,
    print
msg59392 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2008-01-06 16:05
I edited the example a bit and added it to the docs in r59778.
History
Date User Action Args
2022-04-11 14:56:23adminsetgithub: 44764
2008-01-06 16:05:13georg.brandlsetstatus: open -> closed
assignee: skip.montanaro -> georg.brandl
resolution: fixed
messages: + msg59392
nosy: + georg.brandl
2007-03-22 22:04:36guettlicreate