(self)
| 265 | yield line |
| 266 | |
| 267 | def read(self): |
| 268 | with lzma.open( |
| 269 | self.path, |
| 270 | mode=self.mode, |
| 271 | format=self.format, |
| 272 | check=self.check, |
| 273 | preset=self.preset, |
| 274 | filters=self.filters, |
| 275 | encoding=self.encoding, |
| 276 | errors=self.errors, |
| 277 | newline=self.newline, |
| 278 | ) as file_content: |
| 279 | return file_content.read() |
| 280 | |
| 281 | |
| 282 | COMPRESSION_CLASSES = [GZFile, BZ2File, XZFile] |