Revision 7211
Added by Aaron Marcuse-Kubitza almost 12 years ago
csvs.py | ||
---|---|---|
87 | 87 |
# Prevent "new-line character seen in unquoted field" errors |
88 | 88 |
record = record.replace('\r', ending_placeholder) |
89 | 89 |
|
90 |
row = record.split(self.dialect.delimiter) |
|
90 |
# Split line |
|
91 |
if len(self.dialect.delimiter) > 1: # multi-char delims |
|
92 |
row = record.split(self.dialect.delimiter) |
|
93 |
else: row = csv.reader(StringIO.StringIO(record), self.dialect).next() |
|
94 |
|
|
91 | 95 |
return [strings.replace_all(tsv_decode_map, v) for v in row] |
92 | 96 |
|
93 | 97 |
def reader_class(dialect): |
Also available in: Unified diff
csvs.py: TsvReader: Use csv.reader.next() when possible to support quoted fields, such as in Madidi.IndividualObservation