Chop off comments, strip, and split at delimiter.
(self, line)
| 196 | self.encoding = encoding |
| 197 | |
| 198 | def _delimited_splitter(self, line): |
| 199 | """Chop off comments, strip, and split at delimiter. """ |
| 200 | if self.comments is not None: |
| 201 | line = line.split(self.comments)[0] |
| 202 | line = line.strip(" \r\n") |
| 203 | if not line: |
| 204 | return [] |
| 205 | return line.split(self.delimiter) |
| 206 | |
| 207 | def _fixedwidth_splitter(self, line): |
| 208 | if self.comments is not None: |