from pathlib import Path from zipfile import ZipFile html = r''' FPS Prototype
RIFLE
30 / 90
Burst Tracking Enabled
WASD = Move
Mouse = Look
Left Click = Shoot
1 = Rifle
2 = Sniper
3 = Plasma Gun
''' path = Path("/mnt/data/index.html") path.write_text(html) zip_path = "/mnt/data/fps_game.zip" with ZipFile(zip_path, "w") as zipf: zipf.write(path, arcname="index.html") print("Created:", path) print("Created:", zip_path)