File size: 425 Bytes
9533566
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import zipfile
import os

def zip_output():
    zip_path = "output_bundle.zip"
    with zipfile.ZipFile(zip_path, "w") as zipf:
        for root, dirs, files in os.walk("output"):
            for file in files:
                file_path = os.path.join(root, file)
                arcname = os.path.relpath(file_path, "output")
                zipf.write(file_path, arcname=os.path.join("output", arcname))
    return zip_path