WORKING OF PYTHON ENGINE
What is Python Engine?
→Python Engine executes source code or program and produces output.
HLL — High Level Language
BC — Byte Code
LLL — Low Level Language
How does Python Engine work?
Python Engine is a main engine which will take our source code and give it to a machine and tell the machine to obey. In return the python engine will produce an output.
When we click on the run button the entire source code will be given to block called syntax checker which will present inside the python engine.
Syntax Checker (SC):
→Syntax checker will go through the entire program or set of instructions to check whether the programmer is following the rules or not.
→If the programmer is not following the python rules, then it shows an error message called syntax error.
→If there is no error in the program or source code then this entire source code will be given to another block called compiler.
Get Ajay Danthuluri’s stories in your inbox
Join Medium for free to get updates from this writer.
Compiler:
→In python engine compiler converts high level language into intermediate language called byte code.
→Byte Code is a language which was generated between high level language and low-level language.
→Here byte code is an intermediate language, which cannot be understood by the machine because it contains 0`s and 1`s along with some instructions.
→Then the byte code will be given to a machine by python engine which was present inside python engine called as PVM (Python Virtual Machine).
PVM (Python Virtual Machine):
→PVM contains an interpreter. This interpreter takes byte code and converts it into a low-level language.
Interpreter:
→Interpreter converts high level language into low level language.
→Here interpreter will take byte code and convert that byte code which contains 0`s and 1`s along with some instructions into low-level language.
→At the time of conversion there is a chance of getting an error called Exception.
→Exception is also called as logical error. It occurs when there is no logic in our program.
→If there is no exception then the low-level language will be given to our machine.
→Machine will accept and produces output.









