A game for learning Python concepts through six increasingly challenging puzzles. Each room presents broken code β fix it to unlock the door.
Requires Python 3.11+ and uv.
uv syncuv run app.pyuv run build.pyProduces dist/PythonEscapeRoom.app. Drag it to Applications or double-click to play.
| # | Title | Concept |
|---|---|---|
| 0a | The Override | Subclassing β override a base class method |
| 0b | The Contract | Abstract base classes (ABC, @abstractmethod) |
| 1 | The Waiting Room | asyncio.gather β run coroutines concurrently |
| 2 | The Memory Vault | Generators β yield instead of building a list |
| 3 | The Spider's Web | Async generators β async def + yield |
| 4 | The Final Lock | Twisted DeferredQueue + gatherResults (how Scrapy works under the hood) |
app.py β tkinter UI
build.py β builds PythonEscapeRoom.app via PyInstaller
rooms/
__init__.py β public interface (ROOMS, Room, RunResult, run_room)
base.py β Pydantic models (Room, RunResult)
runner.py β code execution engine and AST helpers
room_0a.py β The Override
room_0b.py β The Contract
room_1.py β The Waiting Room
room_2.py β The Memory Vault
room_3.py β The Spider's Web
room_4.py β The Final Lock