Search This Blog

Thursday, July 31, 2014

Python is interpreted or compiled?

Code written in any high level language is either converted into the machine code by compiler tool chain (preprocess -> compile -> link) that can be executed on the CPU or can be converted into an intermediate code that can be executed on the CPU by an interpreter(VM).

In python, the .py file is converted into bytecode (.pyc) before it is executed by the interpreter. So, working with python involves a stage of compilation before the interpreting is done.

No comments:

Post a Comment