views:

94

answers:

2

Possible Duplicate:
CPython is bytecode interpreter?

My question is:

Does Python use a compiler, an interpreter or a combination of them?

+2  A: 

Python uses a virtual machine aproach (as PHP, Ruby, .NET languages etc), python implementation uses a compiler to create intermediate language that is executed on a virtual machine.

Horacio Nuñez
A: 

yes it use an interpreter, just run the .py and then it will be ecxecuted! if you want to compile your script to run on another machine as a .exe program you can compile it with th py2exe library

cherif
-1 it uses a compiler and then executes the bytecode on a virtual machine. look at the `dis` module from the standard library
aaronasterling