Difference between various implementation of Python
In this tutorial, you are going to learn what is the difference between the various implementation of Python.
There are different types of implementation in Python. They are
- Iron Python
- MicroPython etc.,
I want to differentiate the above seven types. The first one is Python which is the normal Implementation form.
Implementation of Python:
It coverts machine code into byte code by using an interpreter.
Python is a high-level language. At first, Python is implemented in CPython. The system that translates and runs the program in an interpreter called Python Interpreter.
There are two types of modes: Immediate mode and script mode.
Immediate mode: you can write the python program in the interpreter window and it can show the immediate results.
Script mode: you can write the program in a file and interpreter executes the file it is known as script file nothing but script mode.
Implementation of the CPython:
CPython is the endorsement of Python. If we write a program in Console or command prompt then we are using CPython. It is having many Python runtimes that are managed and written by developers which are written in C language.
In CPython the compilation process is different. It includes a lot of steps in between the conversion of the source to bytecode.
Compilation steps as follows:
- First, it should convert parse into a parse tree.
- The second step should change into the parse tree into an Abstract syntax tree.
- The third step changes the Abstract syntax tree into a Control flow graph.
- The fourth step should discharge the byte code based upon the Control flow graph.
Implementation of Jython:
Jython is the Java implementation of Python. Jython is designed to run the Python program in Java. It is a JVM Implementation.
Jython is available for any platform which is having JVM installed in it.
Jython files extension is .class.
Jython is multithreaded.
Jython has no separate compilation steps.
Implementation of IronPython:
IronPython is used in .Net Frameworks. It is an open-source implementation of Python integrated with .Net Frameworks. It is a Python compiler that compiles the Python code into memory byte code before executing the program.
The main difference in Iron Python is to run CLR(.Net Frameworks). It can interoperate .Net assemblies written in .Net Languages.
Implementation of PyPy:
PyPy is another form of Python Implementation. It runs faster than the CPython because it is a jit compiler in an interpreter.
PyPy doesn’t carry the full API used by modules.
It is also known as RPython because of the meta-tracing toolchain.
Implementation of StacklessPython:
Stackless Python is an elevated version of Python programming language.
It allows the Programmers to gather the benefits of threads.
Stackless Python adds some features without changing its behavior of the program.
Implementation of MicroPython:
MicroPython is a software implementation of Python written in C which is used for microcontrollers.
MicroPython can control connected devices and hardware.
MicroPython adds a cross compiler that generates bytecode of MicroPython.
Here we have another functionality also that is Pyboard and microcontroller board.
By using MicroPython we can control GPIO(General Purpose Input/Output) pins to blink lights, read Switches, and drive PWM (Pulse Width Modulation) Outputs for LEDs, etc., we can use analog to digital converter to read sensors.
These are some of the implementations of Python with various types.
Leave a Reply