public CSVReader( filename as String, delimiter as Char = ',', quoteChar as Char = '"', escapeChar as Char = '\u0000', doubleQuote as Boolean = true, skipInitialSpace as Boolean = false, strict as Boolean = true, encoding as String = "auto" )
Opens a CSV file without parsing its records. The file is owned by this generator and closed on exhaustion, failure or explicit close().
| Parameter | Description |
|---|---|
filename | CSV file path. |
delimiter | Field delimiter. Default is comma. |
quoteChar | Quote character; U+0000 disables quoting. |
escapeChar | Escape character; U+0000 disables escaping. |
doubleQuote | Decode doubled quotes inside quoted fields. |
skipInitialSpace | Ignore spaces before a field and after a closing quote. |
strict | Reject malformed quoting when the affected record is read. |
encoding | Charset name; auto selects the Unicode BOM or UTF-8. |
try reader = CSVReader("contacts.csv", delimiter=';'): print(reader.next())