标签:文件压缩 lis code pat file_path flat jpa extract close
文件压缩
zipfile_obj = zipfile.ZipFile(zipfile_objpath, ‘a‘, zipfile.ZIP_DEFLATED) for dirpath, dirnames, filenames in os.walk(customer_file_path): for file in filenames: zipfile_obj.write(file, zipfilepath) zipfile_obj.close
文件解压缩
f = zipfile.ZipFile(zipfilepath, ‘r‘) for file_obj in f.namelist(): unzipfile = f.extract(file_obj, unzipfilepath)
、
标签:文件压缩 lis code pat file_path flat jpa extract close
原文地址:http://www.cnblogs.com/CN-S/p/6274409.html