就是这么简单
代码语言:javascript复制import zipfile
import os
def un_zip(file_name):
"""unzip zip file"""
zip_file = zipfile.ZipFile(file_name)
if os.path.isdir(file_name "_files"):
pass
else:
os.mkdir(file_name "_files")
for names in zip_file.namelist():
zip_file.extract(names,file_name "_files/")
zip_file.close()
un_zip("E:\fiddler_data\Fiddler_20171215_23-52-45.saz")