Running Python in Zerethon IDE

What Run does with your project, the time limit, input, tests, and what a run cannot do.

Runs in Zerethon IDE · Python 3.12 Official Python documentation ↗
  • Run (Ctrl/⌘+Enter) runs the entry file — main.py by default — with Python 3.12. Make another file the entry with the ▶ button next to it in the explorer, or run the open file from the Run ▾ menu.
  • Output and errors appear in the Output tab; what you type in the Input tab is the program's standard input.
  • A run is stopped after 10 seconds. Memory is limited, there is no network, and the project files are read-only (write to /tmp).
  • Run tests (Ctrl/⌘+Shift+Enter) runs every file named test_*.py, each in its own interpreter. A test file passes when it finishes without an error, so a failing assert fails it.
test_geometry.py
from geometry import area

assert area(2, 3) == 6
assert area(0, 5) == 0
print("geometry ok")
A test file for the geometry.py module from “Modules and several files”.

Tip: Format (Ruff) tidies the selection or the whole file; problems are underlined while you type when the language server is available.