compiling to python byte codes

Jacob Hallen jacob at cd.chalmers.se
Mon Sep 13 09:20:47 EDT 2004


In article <4137bf73$1 at news.unimelb.edu.au>,
Maurice LING  <mauriceling at acm.org> wrote:
>Jeremy Bowers wrote:
>> On Thu, 02 Sep 2004 23:10:11 +0000, Maurice LING wrote:
>I am using SBML (system biology markup language) as a front-end 
>modelling language for my project. And for ease of further maintenance 
>of the model and interoperability purposes, my project requires me to 
>convert it into an intermediate form (MA), which is somewhat assembly is 
>structure, as in, each instruction takes the form of <opcode> 
><operand>*. Here I am, attempting to write a virtual machine that can 
>run MA, using python. So, it becomes a MA virtual machine running on 
>python virtual machine.
>
>My concern is, is it simpler to convert MA to python codes or python 
>bytecodes. What are the pros and cons? Assuming that to convert to 
>python source code is a choice, I'm thinking that MA virtual machine can 
>then read a MA instruction and output the corresponding python source 
>codes, but are there facilities in python to run python codes, line by 
>line, as it is being thrown out by MA virtual machine?

The Python virtual machine is not something that is fixed. It may change
between Python versions. For this reason, it is a bad idea to generate
bytecode directly, since you may have to redo the work many times. It is
much better to have Python as the target language of your SBML compilation.

Jacob Hallén

-- 



More information about the Python-list mailing list