csv module

Laurent Laporte laurentlaporte at yahoo.com
Wed Dec 28 08:28:40 EST 2005


Sorry,

Here is my example:

Python 2.3.1 (#1, Sep 29 2003, 15:42:58)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-98)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import csv
>>> t_sniffer = csv.Sniffer()
>>> t_data = "aaa\tbbb\r\n\r\nAAA\tBBB\r\n"
>>> t_dialect = t_sniffer.sniff(t_data)
>>> t_dialect.delimiter
''

In fact, I found the pb (thanks to you): I add a newline '\r\n' to
separate the header from the records...




More information about the Python-list mailing list