Last active
March 16, 2016 13:47
-
-
Save wang-zhijun/8e9fb6b166783679a49b to your computer and use it in GitHub Desktop.
Python zip file
This file contains 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
#!/usr/bin/env python | |
import zipfile | |
z = zipfile.ZipFile("/home/wzj/Downloads/7za920.zip", "r") | |
for filename in z.namelist(): | |
print 'File: ', filename | |
bytes = z.read(filename) | |
print 'has', len(bytes), 'bytes' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment