mrmp/catalog.py
Marc Beninca fc17992b20 catalog
2023-01-28 21:19:16 +01:00

17 lines
332 B
Python

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()