Native code compiler for python?

Gerhard Häring gerhard at bigfoot.de
Fri Jun 7 16:09:16 CEST 2002


* nobody <d2002xx at softhome.net> [2002-06-07 06:50 -0700]:
> Is there any existing native code compiler for python?

<hint>Have you checked groups.google.com?</hint>

> Or Python to C translator? Or someone is doing this?

Yes, several, Pyrex among others. But they only compile a subset of
Python.

Is this question just motivated by interest or do you have any problem
with just using the Python interpreter?

Do you only want to have a standalone app without requiring an installed
interpreter? freeze, McMillan's Installer and py2exe are solutions for
_this_ problem.

The solution for slow Python code is using a better algorithm, and if
this is not possible, writing the innermost loops in C/C++/Fortran/Ada
(even Ocaml is possible, IIRC). Using Pyrex might become a possible
solution, too.

Gerhard
-- 
mail:   gerhard <at> bigfoot <dot> de       registered Linux user #64239
web:    http://www.cs.fhm.edu/~ifw00065/    OpenPGP public key id AD24C930
public key fingerprint: 3FCC 8700 3012 0A9E B0C9  3667 814B 9CAA AD24 C930
reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))





More information about the Python-list mailing list