Skip to content

Instantly share code, notes, and snippets.

@wang-zhijun
Last active March 16, 2016 13:47
Show Gist options
  • Save wang-zhijun/8e9fb6b166783679a49b to your computer and use it in GitHub Desktop.
Save wang-zhijun/8e9fb6b166783679a49b to your computer and use it in GitHub Desktop.
Python zip file
#!/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