zipfile: 解压: import os, zipfile serverzip_path = 'D:\\server.zip' serverzip_target_path = 'd:\\2' f = zipfile.ZipFile(serverzip_path, 'r') for file in f.namelist(): f.extract(file, serverzip_target_path) f.close() #一定要关闭,不然zipfile一直处于读取压缩包状态 解压:def z…