Python v2 logo — two snakes, red and blue python™v2
▶ Subscribe Donation • Soon

All the Flow You'd Expect

Python v2 knows the usual control flow statements that other languages speak — if, for, while and range — with some of its own twists, of course.

More control flow tools

Python v2 is a programming language that lets you work quickly and integrate systems more effectively. »»> Learn More

Donations are coming soon

Python v2 is free and open source. We are not collecting money or payment details yet—follow the project for a future support page.

Donation • Coming Soon
Python v2 1.1 “Sudbury” is out
Now with structured try/catch/finally, richer iterable tools, the desktop Launcher, Windows EXE builds, PyHope, and the 9M GPU lab.

»»>Success Stories

Things people have built with Python v2 + PyHope — from a pure CPU framebuffer to an optional 9.4-million-pixel GPU render.

“One readable language can move from a browser idea to a desktop workspace, a game, a polished website, and a real Windows application.”
Python v2 1.1 “Sudbury” release story
▶

The CPU raycaster

A Wolfenstein-style renderer with original monster sprites, AI and a blaster. It flies past nine million computed pixels in under three seconds — play it.

▦

The Sudbury desktop app

Our own lightweight Launcher edits and runs Python v2, creates websites and games, previews projects, and opens the PyHope GPU lab. Get the app.

✓

Your profile, projects, and games—one template

The Playground’s portfolio studio turns editable Python v2 data into a polished personal website with live preview, exact HTML, project cards, and playable game links. Build yours.

»»>Get Started

Python v2 is free and open source. Run from source or use the installer to get the Sudbury desktop app, language, Windows EXE builder, and PyHope together. Full guides for VS Code, dev containers, desktop and any editor are on the Downloads page and in the documentation — then learn the language with the tutorial.

1. Grab the runtime

git clone https://github.com/gefrus112/pythonv2
cd pythonv2

2. Run something

python3 -m pyv2 examples/hello.pyv2

3. Or just talk to it

python3 -m pyv2
>>> print(f"{'2' * 3}")
222
Installation & editor setup

Your first program

# hello.pyv2
fn greet(name):
    if name == "":
        return "Hello, stranger!"
    end
    return f"Hello, {name}!"
end

for who in ["World", ""]:
    print(greet(who))
end

»»>Why v2 beats v1

Old PythonPython v2
def foo(): + invisible whitespacefn foo(): … end
TabError: inconsistent use of tabsNo such thing. Ever.
"n=" + str(n)"n=" + n
x if ok else y (backwards)ok ? x : y
Exception objects and boilerplatecatch error gives a useful map; finally always runs
assert statementassert(cond, msg) — a normal function
Surprising nonlocal rulesClosures just work

»»>Better. By Design.

Everything you loved about Python — plus the fixes the old one never shipped.

⏎

No More Indentation Wars

Blocks open with : and close with end. Tabs, spaces — do whatever. The compiler doesn't care. Your team won't either.

ƒ

Real Closures

Assignment finds the variable that already exists, wherever it lives. Counters that count. No nonlocal incantations required.

“”

F-Strings, Solved Forever

f"Hello, {name}!" — interpolation that just works, expressions and all. String concatenation with numbers is legal too.

!

Errors You Can Work With

Recover with try, inspect error.kind and error.message, and rely on finally for cleanup.

⚡

Runs In Your Browser

The same language runs in the terminal and on this very page — the playground is the real interpreter, not a screenshot.

♥

Two Implementations, One Truth

A Python reference runtime and a JavaScript twin, locked together by parity tests. Byte-identical output or the build fails.

»»> PyHope Sprite Raycaster

Start here with one of the arcade's four shooters. This level is drawn the hard way: a software raycaster computes every pixel on the CPU—but now it has original CC0 monster sprites, chasing AI, health, hit detection and a Comet Blaster. At 60 FPS it crosses nine million rendered pixels in 2.7 seconds. Want the GPU version? Visit the 9M GPU Lab.

– FPS MONSTERS 5 • KILLS 0 • HP 100 0 pixels rendered x 6.0 y 2.0

Open the 10-game arcade: shooters, platformers, racing & more →

»»>Documentation

Learn step by step in the tutorial, explore the 50-topic field guide, or dig into installation in VS Code, dev containers / Codespaces, desktop and any code editor.

print(...)

Print any number of values, space-separated.

print("sum:", 1 + 2)

f-strings

Interpolate any expression with braces.

f"{name} scored {score * 2}"

fn / end

Functions are values. Closures capture properly.

fn add(a, b): return a + b end

if / elif / else

Blocks end with end, not a column number.

if x > 0: print("pos") end

while / break / continue

The usual loop verbs, no surprises.

while true: break end

for … in

Iterate lists, strings, maps and ranges.

for i in range(1, 10, 2): print(i) end

lists

[1, 2, 3] with methods that spark joy.

xs.push(4) xs.sort()

maps

Bare keys, dot access, safe get.

hero = {name: "Ada"} → hero.name

ternary

Condition first, like a question should be.

status = ok ? "yes" : "no"

try / catch / finally

Recover from runtime errors, inspect their fields, and always clean up.

try: risky() catch error: print(error.kind) end

builtins

len, range, sum, enumerate, zip, all, any, type, …

print(sum(range(5)))

string methods

upper, split, replace, trim, contains, slice, …

"a,b".split(",").join("-")

numbers

+ − * / // % **, floored mod, real division.

print(7 // 2, -7 % 3, 2 ** 10)

Full install guides & language reference: docs.html · grammar: docs/LANGUAGE.md

»»>Latest News

All news
  1. Structured error recovery lands in both runtimes

    Use try, catch, finally, and raise with inspectable error details.

  2. Python v2 1.1 “Sudbury” released

    The desktop Launcher and reproducible Windows EXE workflow are available now.

  3. Portfolio Studio arrives in Playground

    Edit Python v2 data and preview a responsive personal site with its exact HTML.

»»>Upcoming

Community
  1. Complete Python v2 installation video

    The full language, editor, PyHope, and app-building walkthrough unlocks at 1,000 subscribers.

  2. Donation support opens

    Donation support is not open yet; no payment information is being collected.

  3. Browser build session

    Open the Playground and make a language program, game data set, or portfolio site.

»»>The Community Runs On Snacks

Python v2 is built in the open on GitHub. Star the repo, file an issue, send a pull request, or just argue about end vs braces.

1language, zero config
2runtime twins
112passing tests
∞indentation saved
1,000 SUBSCRIBER MILESTONE

Get the full install video at 1K

Subscribe to Cube Comet. At 1,000 subscribers, the complete Python v2 + PyHope installation tutorial will be released.

Subscribe @CubeCometYT

Star on GitHub Open an issue