Use python3 as the canonical command name course-wide (#104) #105

Merged
claude merged 1 commits from claude/issue-104 into main 2026-06-23 20:25:05 -04:00
Contributor

Most current systems (default Debian/Ubuntu, recent macOS) install Python only as python3, with no bare python on PATH, so learners who copied python cli.py ... into their host shell hit command not found.

What changed

Converted host-shell python <cmd> -> python3 <cmd> across course content (102 files in modules/, capstone/, blog/):

  • Module + lab READMEs, lab .py docstrings & usage: strings, blog posts, lab prompt/instruction files
  • modules/04-*/lab/verify.sh error-message string (the $PY interpreter detection was already correct and is untouched)
  • The M10/M24 lab .patch files (both -/+ sides converted so they still apply cleanly against the converted cli.py)

Module 01's convention note (and its blog/02 mirror) is rewritten so python3 is the canonical course-wide spelling and python is the documented fallback, keeping the python3 --version / python --version "check which you have" guidance.

Stop-lines respected (left as python on purpose)

  • Docker image tags (FROM python:3.12-slim, image: python:3.12)
  • venv interpreter paths (.venv/bin/python, ...\.venv\Scripts\python.exe) and the Module 20 "command": "python" teaching example + surrounding venv prose
  • Container-internal invocations: M16/M18 Dockerfiles (ENTRYPOINT/CMD/HEALTHCHECK), M16 README docker run ... python:3.12-slim examples
  • CI-workflow run: steps fed by actions/setup-python / image: python:3.12 (standalone ci-starter.yml/gitlab-ci-starter.yml and their mirrored copies inside the M14/M15/M27 READMEs and blog/14)

pip: deferred (documented, not silent)

pip was intentionally left out of scope. Most occurrences are prose ("no pip install") or CI/container-internal, and pip3 does not fix the PEP 668 externally-managed-environment refusal that the course already addresses with venvs. The rewritten Module 01 note is worded to stay consistent with bare pip (use whichever pip pairs with your Python).

Verification

  • Build: python3 tools/build_wiki.py ... succeeds (wrote 31 wiki files, exit 0)
  • Tests: bash tools/check.sh passes (py-compile, shell/JSON/YAML parse, no-em-dash guard, template-section checks)
  • Grep audit: remaining python hits are only the intentional stop-line keeps above
  • Both lab .patch files still git apply --check cleanly

Closes #104

🤖 Generated with Claude Code

https://claude.ai/code/session_01GAEzanEoGJT5o1VizQar47

Most current systems (default Debian/Ubuntu, recent macOS) install Python only as `python3`, with no bare `python` on PATH, so learners who copied `python cli.py ...` into their host shell hit `command not found`. ## What changed Converted host-shell `python <cmd>` -> `python3 <cmd>` across course content (102 files in `modules/`, `capstone/`, `blog/`): - Module + lab READMEs, lab `.py` docstrings & `usage:` strings, blog posts, lab prompt/instruction files - `modules/04-*/lab/verify.sh` error-message string (the `$PY` interpreter detection was already correct and is untouched) - The M10/M24 lab `.patch` files (both `-`/`+` sides converted so they still apply cleanly against the converted `cli.py`) Module 01's convention note (and its `blog/02` mirror) is **rewritten** so `python3` is the canonical course-wide spelling and `python` is the documented fallback, keeping the `python3 --version` / `python --version` "check which you have" guidance. ## Stop-lines respected (left as `python` on purpose) - Docker image tags (`FROM python:3.12-slim`, `image: python:3.12`) - venv interpreter paths (`.venv/bin/python`, `...\.venv\Scripts\python.exe`) and the Module 20 `"command": "python"` teaching example + surrounding venv prose - Container-internal invocations: M16/M18 Dockerfiles (`ENTRYPOINT`/`CMD`/`HEALTHCHECK`), M16 README `docker run ... python:3.12-slim` examples - CI-workflow `run:` steps fed by `actions/setup-python` / `image: python:3.12` (standalone `ci-starter.yml`/`gitlab-ci-starter.yml` and their mirrored copies inside the M14/M15/M27 READMEs and blog/14) ## pip: deferred (documented, not silent) `pip` was intentionally left out of scope. Most occurrences are prose ("no `pip install`") or CI/container-internal, and `pip3` does **not** fix the PEP 668 externally-managed-environment refusal that the course already addresses with venvs. The rewritten Module 01 note is worded to stay consistent with bare `pip` (use whichever `pip` pairs with your Python). ## Verification - Build: `python3 tools/build_wiki.py ...` succeeds (wrote 31 wiki files, exit 0) - Tests: `bash tools/check.sh` passes (py-compile, shell/JSON/YAML parse, no-em-dash guard, template-section checks) - Grep audit: remaining `python ` hits are only the intentional stop-line keeps above - Both lab `.patch` files still `git apply --check` cleanly Closes #104 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01GAEzanEoGJT5o1VizQar47
claude added 1 commit 2026-06-23 20:18:44 -04:00
Most current systems (default Debian/Ubuntu, recent macOS) install Python
only as `python3`, with no bare `python` on PATH, so learners who copied
`python cli.py ...` into their host shell hit "command not found".

Convert host-shell `python <cmd>` -> `python3 <cmd>` across module/lab
READMEs, lab `.py` docstrings & usage strings, blog posts, lab prompt and
instruction files, the M04 verify.sh message, and the M10/M24 lab patches.
Module 01's convention note (and its blog/02 mirror) is rewritten so
`python3` is canonical and `python` is the documented fallback.

Stop-lines respected: Docker image tags (`python:3.12-slim`), `.venv/.../python`
and `...\.venv\Scripts\python.exe` paths, the M20 `"command": "python"`
teaching example and surrounding venv prose, container-internal invocations
(M16/M18 Dockerfiles, M16 README `docker run` examples), and CI-workflow
`run:` steps fed by `actions/setup-python` / `image: python:3.12` are left
as `python` on purpose.

pip was left out of scope: most occurrences are prose or CI/container-internal,
and `pip3` does not fix the PEP 668 externally-managed-environment refusal that
the course already addresses with venvs. The M01 note is worded to stay
consistent with bare `pip` (use whichever pip pairs with your Python).

Build (tools/build_wiki.py) and tools/check.sh both pass.

Closes #104

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GAEzanEoGJT5o1VizQar47
claude merged commit 95e5911957 into main 2026-06-23 20:25:05 -04:00
claude deleted branch claude/issue-104 2026-06-23 20:25:05 -04:00
Sign in to join this conversation.