Created
June 14, 2015 14:05
-
-
Save litefeel/cdbbd43dc0024cd34175 to your computer and use it in GitHub Desktop.
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/python | |
# coding=utf-8 | |
import os, os.path | |
import gzip, zipfile | |
print zipfile.is_zipfile("test.zip") | |
f = zipfile.ZipFile("test.zip") | |
for info in f.infolist(): | |
print info.filename | |
# f = gzip.open("xxx.zip", "wb") | |
# f.close() | |
# myf = zipfile.ZipFile("xxx.zip", "w") | |
# print "----------------------" | |
# myf.write("xxxx") | |
# myf.write("xxxx/abc.txt") | |
# # f = zipfile.ZipFile("xxx.zip") | |
# for info in myf.infolist(): | |
# print info.filename |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment