python查看zip包中的文件及大小

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

#!/usr/bin/env python

import zipfile

z = zipfile.ZipFile("test.zip","r")

for filename in z.namelist():
    print 'File:',filename,
    bytes = z.read(filename)
    print 'has',len(bytes),'bytes'