On-topic: alternate Python implementations

Jürgen A. Erhard jae+python at jaerhard.com
Sun Aug 5 08:28:07 EDT 2012


On Sun, Aug 05, 2012 at 07:46:59AM +0200, Stefan Behnel wrote:
> Jürgen A. Erhard, 05.08.2012 01:25:
> > On Sat, Aug 04, 2012 at 08:40:16AM +0200, Stefan Behnel wrote:
> >> Steven D'Aprano, 04.08.2012 08:15:
> >>> Most people are aware, if only vaguely, of the big Four Python 
> >>> implementations:
> >>
> >> And not to forget Cython, which is the only static Python compiler that is
> >> widely used. Compiles and optimises Python to C code that uses the CPython
> >> runtime and allows for easy manual optimisations to get C-like performance
> >> out of it.
> > 
> > Cython is certainly *not* a Python *implementation*, since it always
> > uses the CPython runtime (and compiling Cython C files requires
> > Python.h).
> 
> Yes, it avoids an unnecessary duplication of effort as well as a
> substantial loss of compatibility that all non-CPython based
> implementations suffer from.

But it's not an Python *implementation*, "just" an extension.

Mind you, this is not intended as a slight of Cython as such.  I
really like it, though I haven't had need for it yet, but I sure
prefer it to writing extensions in pure C. *brrrr*

> > None of the other implementations require Python for actually
> > compiling or running Python source.
> 
> Nuitka was on the list as well.

True, which I realized only after my missive.  But doesn't change
much, only that the list is wrong.

> > Oh, yes, you can create a stand-alone... wait, a "stand-alone" app.
> > By embedding the Python runtime (dynamic linking with libpythonX.Y...
> > maybe static too?
> 
> Sure, that works.

My definition, to also answer your following post, is "does not rely
on any executable part of the CPython source (which includes .c files
and executable code in header files if any, but of course can exclude
the stdlib)".  Not sure that's precise enough, but... if it can't
run/work on a system that has no shred of CPython installed, it's not
an alternative *implementation*.  The big three don't need CPython
(except PyPy for building, and even it can use a precompile PyPy I think).

Grits, J



More information about the Python-list mailing list