import os import zipfile def create_zip(): project_name = "cortex_project" zip_filename = f"{project_name}.zip" with zipfile.ZipFile(zip_filename, 'w') as zipf: for root, dirs, files in os.walk(project_name): for file in files: filepath = os.path.join(root, file) arcname = os.path.relpath(filepath, project_name) zipf.write(filepath, arcname) print(f"✅ Projet compressé dans {zip_filename}") if __name__ == "__main__": create_zip()