Python - interpreted vs compiled

Fredrik Lundh fredrik at pythonware.com
Fri Apr 15 08:18:42 EDT 2005


"codecraig" wrote:

>  I have a question about Python.  I know that it is an interpreted
> language, meaning a python program is converted to binary on the fly
> each time it is run, or compiled.
>  What would be the purpose of compiling?  I guess the compiled python
> code (question, is compiled python code called byte code?..if not, what
> is it called?) is not readable since it is not plain text, which may be
> a reason for compiling...but why else??

the Python runtime runs custom object code ("byte codes") on a virtual machine.
the compilation process converts source code to object code.  to speed things up,
the object code (or byte code, if you prefer) is stored on disk, so it can be reused
the next time the program is run.

</F> 






More information about the Python-list mailing list