mrmp/catalog.py

18 lines
332 B
Python
Raw Normal View History

2021-10-09 21:39:16 +00:00
import io
import tarfile
import package
class Catalog:
def __init__(self, binary):
self.binary = binary
self.load()
def load(self):
f = io.BytesIO(self.binary)
archive = tarfile.open(fileobj=f)
for member in archive.getmembers():
print(member)
archive.close()