lzma.open(filename, mode="rb", *, format=None, check=-1, preset=None, filters=None, encoding=None, errors=None, newline=None)
Open an LZMA-compressed file in binary or text mode, returning a file object.
The filename argument can be either an actual file name (given as a str or bytes object), in which case the named file is opened, or it can be an existing file object to read from or write to.
The mode argument can be any of "r", "rb", "w", "wb", "x", "xb", "a" or "ab" for binary mode, or "r