Working of Python
Contents
ToggleAs python is an interpreted language , it converts its code into byte code. Like most other programming languages, the compiled code is not converted into machine language. Rather in python it is converted into byte code. This code is not understood by the CPU so an interpreter known as the PVM (Python Virtual Machine) is required to execute the byte code.
Step 1: At first , a python code is verified for any syntax errors by the python compiler. If there is any error, the execution is halted and the error message is displayed.
Step 2: If there is no error then , then the python code is converted into byte code by the python interpreter called the Byte Code.
Step 3: The Byte Code is submitted to the PVM (Python Virtual Machine). PVM is the python interpreter which converts the byte code into machine executable code. If any error occurs during the interpretation then the execution is stopped and the error message is displayed.