What actually runs: bytecode, CPython, frozen apps

You type a file. Something compiles it, something executes it. CPython is the usual engine on a college PC. Other engines and ‘frozen’ installers exist — you should know the names so a job ad does not sound like magic.

Application blueprint

A program is folders, config and a main door.

You will be able to

  • Describe source → bytecode → execute
  • Name CPython as the usual college engine
  • Know frozen binaries and other implementations exist

Your file is not what the chip executes

The usual engine (CPython) reads your source, compiles it to bytecode (.pyc caches on a laptop), then a virtual machine runs that bytecode. You still debug the source. If the file is missing, nothing compiled — the launch failed first.

Other implementations exist (faster compilers, or Python on a JVM/CLR). Job ads name them. Until you have a reason, install the current CPython 3 from python.org or the campus image.

Frozen means ‘an installer, not a .py on the desktop’

Tools can bundle an interpreter plus your files into one executable so a clerk does not need Python on PATH. That is packaging, not a new language. Embedding means a C/C++ app starts Python internally — vendor kit territory.

You do not need to build a frozen app in this course. You do need to stop telling accounts ‘just install Python from a random blog’ when a frozen report would have been the handover.

Words that matter

CPython
The standard Python engine — what a college PC usually has.
Bytecode
The compiled form CPython actually steps through.
Frozen binary
An installer that already contains an interpreter + your code.

Common mistakes

Avoid: Emailing a .pyc and calling it the program.

Do this: Handover the .py (or a frozen build) plus a README that names the engine.

Run it step by step

Each box is a real program. Press Run, change a number, Run again — the output must follow your code.

1. Step 1 — source you can read

Humans ship this. The engine compiles it behind the scenes.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

2. Step 2 — a version stamp in config

Say which engine you tested. Tests can print it.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

Example program — Handover line

A clerk can read this. A compiler is not mentioned because they should not need one.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

Your turn — Stamp the engine

Print a line that includes both CPython and report.py.

Python sandboxlesson://workspace
console

Edit the example, press Run, then Build if you want a compile check.

build

Press Build to compile.

Self-assessment

Check your understanding before you mark the lesson complete.

1. CPython is…
2. A frozen binary is useful when…

Progress is stored in a browser cookie on this device.