(cls, string_iterable)
| 263 | |
| 264 | @classmethod |
| 265 | def _get_first_line(cls, string_iterable): |
| 266 | if hasattr(string_iterable, 'tell'): |
| 267 | previous_position = string_iterable.tell() |
| 268 | |
| 269 | try: |
| 270 | first_line = next(iter(string_iterable)) |
| 271 | except StopIteration: |
| 272 | return '' |
| 273 | if hasattr(string_iterable, 'seek'): |
| 274 | string_iterable.seek(previous_position) |
| 275 | |
| 276 | return first_line |
| 277 | |
| 278 | @classmethod |
| 279 | def _detect_encoding(cls, path): |