is there a Python compiler?

Noah Dain noahdain at gmail.com
Wed Mar 15 20:25:29 UTC 2006


On 3/15/06, Scott J. Henson <scotth at csee.wvu.edu> wrote:
> Norton Roman wrote:
> >
> > Actually, it interpretes the code (.py files). However, it also
> > generates a bytecode (.pyc files) to run on its virtual machine, in
> > the case you don't change the original source file. This way, it runs
> > faster code that you did not change.
>
> Actually, it generates the byte code first then executes that.  If it
> can, it writes the resulting compiled byte code to the filesystem so it
> doesn't have to compile it next time.   There is also the -O option to
> write optimized byte code.  If you notice, many python modules and
> programs byte compile themselves(both regular and optimized) at install
> time so that they start faster.  But the runtime is always the same
> regardless of if its pre-compiled to byte code or not.
>
> But, yes, python is a mainly an interpreted language, though there are
> things like iron python, which I believe compiles itself to CLR byte code.
>

look into psycho

http://psyco.sourceforge.net/introduction.html


--
Noah Dain
"Single failures can occur for a variety of reasons that have nothing
to do with a hardware defect, such as cosmic radiation ..." - IBM
Thinkpad R40 maintenance manual, page 25




More information about the ubuntu-users mailing list