Initial Contact with Python Programming Language
Execution of Python Programs#
Source Code#
Python's source code is mostly files with the extension .py
. After writing the code, it is handed over to the compiler (which is the interpreter in this case).
Compiler#
When the source code is submitted to the compiler, it is compiled into bytecode, which is represented by files with the extension .pyc
. These files are then executed by the interpreter.
Interpreter#
The bytecode is submitted to the interpreter called PVM
, which then starts running the code. The compilation is also done by the interpreter. The execution process involves the PVM reading the bytecode and executing it on the processor. There are different implementations of the interpreter:
CPython#
The original and standard implementation.
Jython#
An implementation used for integration with the Java language.
IronPython#
An implementation used for integration with the .NET framework.