Doubt regarding python Compilation

Fredrik Lundh fredrik at pythonware.com
Wed Apr 27 06:48:55 EDT 2005


"praba kar" <prabapython at yahoo.co.in> wrote:

>       I have doubt regarding python Compilation.

you sure have a lot of doubts.

> I want to know whether Python is compiler language
> or interpreted language.  If Python is interpreter
> language why compilation is there.

the CPython implementation of Python runs on a virtual machine (similar to Java),
and the compilation process converts your code to instructions for that machine
(so-called bytecodes).

Python never "interprets" your code; it's always compiled to bytecode before being
executed (this also applies to the interactive promt, which compiles each statement
before running it).

</F> 






More information about the Python-list mailing list