catalog
This commit is contained in:
parent
1a873b5ea2
commit
fc17992b20
2 changed files with 22 additions and 4 deletions
17
catalog.py
Normal file
17
catalog.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
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()
|
Loading…
Add table
Add a link
Reference in a new issue