Created
May 9, 2018 03:04
-
-
Save santosh/3277384806937551f4abbd188f0e6fc9 to your computer and use it in GitHub Desktop.
Zip module test case
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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