压缩一个文件夹,没有文件目录
def zip_dir(zipfile_path, zip_dir_path, file_tyle='*'):
with zipfile.ZipFile(zipfile_path, 'w') as z:
glob_file = glob.glob(os.path.join(zip_dir_path, file_tyle))
for filepath in glob_file:
z.write(filepath, os.path.basename(filepath))