Byte code for python

Paul Rubin http
Sat Feb 15 05:36:37 EST 2003


"Nagender B." <nagender at cs.ucsb.edu> writes:
>  I was just wondering if I can get the byte code specification for python
> online just as Java has its bytcode specification on sun's site. Or can it 
> be found in some book. Any help in this regard will be really appreciated.

"Use the force, read the source".  There's no notion of a Python
virtual machine able to run the same bytecodes across multiple
implementations; therefore, bytecode format isn't part of the Python
specification.

In fact, the two existing Python implementations (CPython and Jython)
both compile Python to bytecodes, but they don't use the same format.
CPython uses an implementation-specific bytecode format that's run by
CPython's own interpreter, and Jython uses Java bytecodes which are
interpreted by the local JVM.




More information about the Python-list mailing list