web hosting and development forums
Web Design and Development Forums Archive


Index - Python programming forum

what langauge is the python interpreter written in


Post reply

Hello, what langauge is the python interpreter written in? like it interprets python programs to binary? like i dont get it, wouldnt it have to have been programmed in another language?
Kopilman, it's written in C
Gladis, okay thanks
Kopilman, which one? there are python interpreters written in C, C++, Java, and even in Python itself. Oh, and in C#
Jackil, but how could an interpreter be written in python, the interpret interprets python, python isnt computer understandable, so it has to be converted to binary right? to make one that was purely python wouldnt the perosn who made it have to knwo binary in order to have it give the proper output?
Kopilman, the interpreter is very slow :)
Kopilman, how can i C compiler be written in C?
Kopilman, it's more of a compiler written in python, that compiles python to something else (like native code or LLVM), and that compiler compiles itself then runs python that natively-compiled compiler can interpret python without actually compiling it, but it's literally 2000 times slower
Does ntaive code == binary? like langauges have to become binary for the comp to do something right? so does that mean that the people who create the languages have to sit down and figure out all the proper binary, i don tget it
Kopilman, yah you can consider them the same. underneath it all has to become machine code eventually
Kopilman, well usually an intermiterary is used, like assembly or LLVM, which are langauges extremely close to machine code. But eventually, with some more progress, PyPy will be able to run programs faster than cPython can today.
Kopilman, they just have to figure out the target, and whoever writes the virtual machine for the target, be it pyc, llvm, java bytecode, clr bytecode, or binary object code, deals with executing it
So programming languages are then like subsets of other languages? dont know if thats the right term, just someone learns one of those langauges and makes a program that lets one type in something more english like which gets translated to the other stuff which gets run as binary
Kopilman, compilers used to be caled "program translators" back in the olden days
Ok
Kopilman, all programming languages are essentially just converted to some other language to run
Okay thank you all for helping




Dubai Forum | Paris Forum | Webmaster Forum | Vegan Forum | Brisbane Forum | 3D Forum | Jobs in Dubai | Jobs in London | London UK Classifieds
Archive script by RedHo.com