def createZipFile(source_dir, zip_path):
print printer.title("Creating zip File: ") + zip_path
try:
if os.path.exists(zip_path):
os.remove(zip_path)
shutil.make_archive(zip_path, 'zip', source_dir)
except:
e = sys.exc_info()[0]
print e
print printer.okGreen("DONE!")
return
评论列表
文章目录