read(source_file, [error_handling]) This method parse subtitles contained in `source_file` and append them to the current instance. `source_file` -> Any iterable that yield unicode strings, like a file opened with `codecs.open()` or an array of unicode.
(self, source_file, error_handling=ERROR_PASS)
| 168 | return new_file |
| 169 | |
| 170 | def read(self, source_file, error_handling=ERROR_PASS): |
| 171 | """ |
| 172 | read(source_file, [error_handling]) |
| 173 | |
| 174 | This method parse subtitles contained in `source_file` and append them |
| 175 | to the current instance. |
| 176 | |
| 177 | `source_file` -> Any iterable that yield unicode strings, like a file |
| 178 | opened with `codecs.open()` or an array of unicode. |
| 179 | """ |
| 180 | self.eol = self._guess_eol(source_file) |
| 181 | self.extend(self.stream(source_file, error_handling=error_handling)) |
| 182 | return self |
| 183 | |
| 184 | @classmethod |
| 185 | def stream(cls, source_file, error_handling=ERROR_PASS): |