compiling to python byte codes
mwh at python.net
Thu Sep 2 15:24:40 CEST 2004
Maurice LING <mauriceling at acm.org> writes:
> I remembered reading a MSc thesis about compiling Perl to Java
> bytecodes (as in java class files). At least, it seems that someone
> had compiled scheme to java class files quite successfully. I'm
> wondering if something of such had been attempted in python, as in
> compiling X language into .pyc.
Not to my knowledge. It wouldn't be very interesting: the Python
bytecode is pretty Python specific.
> I do not understand the schematics of .pyc files but I assume that
> they are the so called python bytecode files.
> Or is there any documentation or books that is the python equivalent
> of "Programming for the Java Virtual Machine" by Joshua Engel?
Nope. As others point out, the details tend to change each (major)
version of Python. The documentation for the standard library module
'dis' might help. You could also look at the 'bytecodehacks' package
(google, and make sure you get the CVS version).
39. Re graphics: A picture is worth 10K words - but only those
to describe the picture. Hardly any sets of 10K words can be
adequately described with pictures.
-- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html
More information about the Python-list