How does python work

A.M. Kuchling amk at
Thu Jul 10 17:11:12 CEST 2003

On Thu, 10 Jul 2003 13:05:07 +0200, 
	Geiregat Jonas <eniac at> wrote:
> I'm asking myself how Python code get's executed ...
> What happens first etc ...
> First read the file and then ..

The code is parsed and compiled into bytecode that can then be executed.
Consult a textbook on parsing or programming language implementation for
more details about how parsing is done.  

I thought someone (MWH?) wrote an explanation of Python's internals once,
but can't find anything at the moment.  The Python docs have some relevant
material (, but that document
doesn't concentrate on the implementation details, just on the bits you can
easily access from extensions.

> also could someone point me to the build in functions in the python source
> code ?

They're in Python/bltinmodule.c.

OTHELLO: Once more, well met at Cyprus!
      -- _Othello_, II, i

More information about the Python-list mailing list