[Compiler-sig] Python Bytecode
Guido van Rossum
guido@python.org
Wed, 05 Apr 2000 10:09:15 -0400
> The *.pyc files are 8 bytes of header (a magic number and a time
> stamp, though I can't remember which order...) followed by a
> marshalled code object. So if you wan't to have a completely
> independent VM, you first need to write a demarshaller ...
> documentation is probably the source of Modules/marshal.c.
If you get JPython, there's marshalling code written in Python that
may be easier to read than the C code.
Also, get Jeremy Hylton's compiler (see this sig's homepage or
archives), he has routines for generating Python bytecode files
written in Python.
--Guido van Rossum (home page: http://www.python.org/~guido/)