Utility · sources and further reading
Resources
Everything this hub teaches is checked against the documents below. Same rule as every week: when a tutorial found in a search disagrees with these, these win.
Official documents
| Document | Use it for | Licence |
|---|---|---|
| The Python Tutorial | The language, from the source; chapters 1–4 cover this week | PSF documentation licence |
| venv, standard library docs | Exactly what a virtual environment is and every option | PSF documentation licence |
| Packaging Guide: pip and virtual environments | The pip + venv workflow, including requirements.txt | PyPA, open documentation |
| gpiozero documentation · recipes | Every component class, with wiring diagrams; the recipes are this course's example bank | BSD-licensed project docs |
| Raspberry Pi hardware documentation | The authoritative GPIO electrical description | CC BY-SA 4.0 |
| Raspberry Pi OS documentation | Python on the Pi, the venv policy, --system-site-packages advice | CC BY-SA 4.0 |
| pinout.xyz | The interactive header map; the pinout command is its terminal twin | Community reference (CC BY-SA) |
Background reading, matched to the stages
| Stage | Read this for the ideas behind it |
|---|---|
| Python from zero | Official tutorial ch. 1–4; Automate the Boring Stuff ch. 1–3 for a project-flavoured second telling |
| Environments | The Packaging Guide for the workflow; venv docs for the mechanism |
| GPIO, safely | Hardware documentation GPIO section; pinout.xyz per pin |
| First light | gpiozero recipes: LED, Button, and everything your kit can build next |
Reading order for a beginner: this hub, then Automate the Boring Stuff for fluency, then the official tutorial when you want precision, with the gpiozero recipes as the standing invitation to build.
Practice
- Automate the Boring Stuff with Python: the free classic for beginners; readable on any device, exercises included. This week's homework uses its first chapters.
- Raspberry Pi Foundation projects: guided Python and electronics projects at exactly this level, many using the same kit parts.
- gpiozero recipes: not just reference; each recipe is a buildable exercise. The remote-GPIO chapter of the same docs shows how to drive the Pi's pins from another computer at home.
- Thonny: the beginner Python editor preinstalled on the Pi desktop. This course works over SSH with
nanofor good reasons (headless habits), but at the Pi's own desk Thonny's debugger, which steps through code line by line, is genuinely instructive.
Glossary
| Term | Meaning |
|---|---|
| Interpreter | The python3 program that executes your script's text, line by line. |
| REPL | The interactive >>> prompt: read, evaluate, print, loop. |
| Script | A .py file run start to finish by the interpreter. |
| Variable / type | A name bound to a value; the value's kind (int, float, str, bool). |
| f-string | f"text {value}": text with values spliced in. |
| Module / import | A unit of borrowed code; the statement that brings it into your program. |
| pip / PyPI | Python's package installer / the index it installs from. |
| Virtual environment | A project-private Python setup in a .venv folder, activated per session. |
| externally-managed-environment | Debian's refusal of bare pip on the system Python; the signpost toward venvs. |
| requirements.txt | The committed recipe (pip freeze) from which an environment can be rebuilt. |
| GPIO / BCM numbering | The programmable header pins / the SoC channel numbers (GPIO17) that gpiozero uses. |
| Pull-up / pull-down | A resistor (internal here) giving an input a defined idle level instead of floating. |
| Debounce / bounce_time | Merging a mechanical contact's chatter into one logical press. |
| Polling / event-driven | Asking in a loop versus registering a function the library calls when something happens. |
| Traceback | Python's error report; read from the bottom line up. |
| gpiozero | The Raspberry Pi Foundation's Python library for GPIO components. |