Stability of PYC files

Guido van Rossum guido at python.org
Sun Jul 22 12:12:24 EDT 2001


Stephen Horne <steve at lurking.demon.co.uk> writes:

> Are the Python compiled bytecode PYC files stable enough that you can
> take PYC files generated by older versions of Python and run them
> without the source on newer versions?

Definitely NOT.  The PYC files are a detail of the implementation and
vary across versions!

> Has anyone ever tried to document Python bytecode?

Not exactly, but the docs for the standard library module "dis" give a
lot of details.  Also read the source for py_compile.py.

> Does jPython compile to Java bytecode, or does it act more directly as
> an interpreter, or does it use an intermediate bytecode?

Jython generates Java bytecode (which mostly consists of calls into
the Jython run-time library :-).

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list