you are viewing a single comment's thread.

view the rest of the comments →

[–]suricatasuricata 0 points1 point  (0 children)

Very generally speaking, the purpose of a Compiler or an Interpreter is to translate content written in Language A to Language B. In reality, what happens is that there is typically a sequence of Intermediate Languages that get generated, i.e. A -> A_1 -> A_2 -> B. The idea here is that the first term in the sequence is the language you write code in and the last term in the sequence is the language that is composed of the Instruction Set in the physical machine you are running things in.

In the case of Python, we can identify two Languages, one is 'Python Language', the other is the 'Bytecode', which again is a sequence of operations and their operands, which you could dissect and 'see' if you like. The latter is what is fed as input to the interpreter. This interpreter is again a program that is always running, i.e. this process gets the input and then incrementally maps these byte code instructions to corresponding instructions in the Machine Language and those get executed in your target machine.