Skip to content

Instantly share code, notes, and snippets.

@santosh
Created May 9, 2018 03:04
Show Gist options
  • Save santosh/3277384806937551f4abbd188f0e6fc9 to your computer and use it in GitHub Desktop.
Save santosh/3277384806937551f4abbd188f0e6fc9 to your computer and use it in GitHub Desktop.
Zip module test case
import zipfile
zip = zipfile.ZipFile('Archive.zip', 'r')
print(zip.namelist())
for meta in zip.infolist():
print(meta)
print(zip.read(("wishlist.txt")))
with zip.open("wishlist.txt") as f:
print(f.read())
zip.extract("purchased.txt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment