Table of contents
We use python software/ interpreter:
>python
chai.py
The Byte code of python is fetched by python vm and then run by it.
Must watch below video (Hindi) by our teacher Hitesh sir.
- Compile to Byte Code
Python is not compiled language rather it is converted from code to byte code the process is called compile to byte code.
Byte code is low level code, platform independent. It requires only python vm on any machine.
Byte code runs faster than usual script code.
.pyc is a compiled python. It is also called as frozen binaries.
pycache used to oragnize source change & python version.
hello_chai.cpython-312.pyc In python the diffing algorithm is used where there is one file that has code until now and only new changes introduced by coders are updated in that file just like git.
Works only for imported files
not for top level files.
Python virtual machine:
PVM is the Run time engine for python just like we have v8 engine in javaScript.
Also known as python interpreter.
Byte code not machine code
Python specific interpretation.
Standard implimentation is python is cpython, there are also options like jython, IronPython,Stackless, PyPy