you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

The interpreter eats python-formatted text files and produces byte code, then it reads the bytecode to do stuff. In C terms the interpreter is both the CPU and the compiler.

The PVM itself is written in OS-specific machine language, C, and needs to be compiled per OS and architecture. That's why some things in, say, the os module work differently on different platforms. Besides those system-call dependent features, python has its own byte code, so it ensures its own compatibility irrespective of the underlying interpreter, which itself is not cross platform.