I want to know the difference between CPython and Python because I have heard Python is developed in C - then what is the use of CPython?
Asked
Active
Viewed 2.1k times
39
-
Is there anything that can be done to change the text of the duplication mark. The linked question and its answers are without any doubt more informative, but this question was asked more than 3 years earlier. That's why *“This question **already has** answers here”* (emphases mine) is misleading. I read [this comment on meta](https://meta.stackoverflow.com/questions/285177/can-we-have-dynamic-description-texts-for-duplicate-questions-based-on-the-targe#comment150618_285177) that there is a way. Can someone please help me figure out how to do it? – Wolf Feb 13 '23 at 09:50
2 Answers
42
Python is a language.
CPython is the default byte-code interpreter of Python, which is written in C.
There is also other implementation of Python such as IronPython (for .NET), Jython (for Java), etc.

kennytm
- 510,854
- 105
- 1,084
- 1,005
-
thx !! I understand CPython is default byte-code interpreter for Python. But who takes care of converting Python to byte-code in first place ? – rahulaga-msft Nov 01 '18 at 14:40
-
@RahulAgarwal Also CPython. The *.pyc bytecode format is specific to CPython. Other implementations could use other bytecode formats. – kennytm Nov 01 '18 at 17:10
-
ohk, got it. so this means IronPython for example converts python to msil, right? – rahulaga-msft Nov 01 '18 at 23:24
-
-
one more last point :) This means CPython takes care of converting Python code to Byte Code and also interpret byte code to machine code ? In nut shell CPython is **Compiler** (for conversion from Python to Byte Code) and also **Python Virtual Machine** (for Byte code to Machine code) ? When Comparing same to .Net, there is C# Compiler to Convert C# to MSIL and CLR (JIT) to convert from MSIL to Machine code. – rahulaga-msft Nov 02 '18 at 14:05
-
1@RahulAgarwal Yes. You may find details about the Compiler in https://devguide.python.org/compiler/, and the bytecode interpreter is explained in https://stackoverflow.com/questions/19916729/how-exactly-is-python-bytecode-run-in-cpython. – kennytm Nov 02 '18 at 14:29
-
-
(late to the party): in a nutshell, Cython is an application written in C. This application is a bytecode-interpreter. Am I right? – Adarsh TS Sep 16 '20 at 12:09