Module
csv

CSV parsing and writing.

This module provides classes that assist in the reading and writing of Comma Separated Value (CSV) files, and implements the interface described by PEP 305. Although many CSV files are simple to parse, the format is not formally defined by a stable specification and is subtle enough that parsing lines of a CSV file with something like line.split(",") is bound to fail. The module supports three basic APIs: reading, writing, and registration of dialects.

DIALECT REGISTRATION:

Readers and writers support a dialect argument, which is a convenient handle on a group of settings. When the dialect argument is a string, it identifies one of the dialects previously registered with the module. If it is a class or instance, the attributes of the argument are used as the settings for the reader or writer:

class excel: delimiter = , quotechar = " escapechar = None doublequote = True skipinitialspace = False lineterminator = \r\n quoting = QUOTE_MINIMAL

SETTINGS: