compiling to python byte codes
Jason Lai
jmlai at uci.edu
Thu Sep 2 19:32:00 EDT 2004
Maurice LING wrote:
> Hi Leif,
>
> Leif K-Brooks wrote:
>
>> Maurice LING wrote:
>>
>>> Or is there any documentation or books that is the python equivalent
>>> of "Programming for the Java Virtual Machine" by Joshua Engel?
>>
>>
>>
>> Python's byte code isn't very stable, so you might have to recreate
>> your entire code base with every new Python version. I would suggest
>> generating Python code (not byte code) instead and compiling that.
>
>
> So are you suggesting that say I want to write a compiler to compile
> Pascal to Python Virtual Machine, it will be wiser to do source code
> conversion from Pascal to Python?
>
> maurice
What about generating an Abstract Syntax Tree (compiler.ast) and using
the compiler module (compiler.pycodegen) to write the bytecode?
More information about the Python-list
mailing list