Differences between revisions 1 and 64 (spanning 63 versions)
Revision 1 as of 2007-05-10 14:55:02
Size: 431
Editor: CameronLaird
Comment:
Revision 64 as of 2011-07-16 04:17:27
Size: 7835
Editor: StefanBehnel
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
"Implementation" here means ... There have been and are several distinct implementations of what we all recognize as Python, or occasionally a variant of Python:
 * ActivePython
 * ["CPython"]
 * IronPython
 * ["Jython"]
 * ...
## page was renamed from implementation
<<TableOfContents>>

= Python Implementations =

An "implementation" of Python should be taken to mean a program or environment which provides support for the execution of programs written in the Python language, as represented by the [[CPython]] reference implementation.

There have been and are several distinct software packages providing of what we all recognize as Python, although some of those are more like distributions or variants of some existing implementation than a completely new implementation of the language.

== CPython Variants ==

These are implementations based on the [[CPython]] runtime core (the de-facto reference Python implementation), but with extended behaviour or features in some aspects.

 * [[http://crosstwine.com/linker/python.html|CrossTwine Linker]] - a combination of CPython and an add-on library offering improved performance (currently proprietary)
 * [[StacklessPython|Stackless Python]] - CPython with an emphasis on concurrency using tasklets and channels (used by [[https://www.develer.com/trac/dspython/|dspython]] for the Nintendo DS)
 * [[http://www.mhuffman.com/resource/index.html|Tiny Python]] - not to be confused with tinypy, below (link appears dead, cannot be verified)
 * [[http://code.google.com/p/unladen-swallow/|unladen-swallow]] - "an optimization branch of CPython, intended to be fully compatible and significantly faster", originally considered for merging with CPython subject to PEP PEP:3146, but now unmaintained
 * [[http://code.google.com/p/wpython/|wpython]] - a re-implementation of CPython using "wordcode" instead of bytecode

== Other Implementations ==

These are re-implementations of the Python language that do not depend on (or necessarily interact with) the [[CPython]] runtime core. Many of them reuse (a large part of) the standard library implementation.

Note that most of these project have not yet achieved language compliance. However, many of these have goals and features or run in certain environments that make them interesting in their own regard. The only implementations that are known to be compatible with a given version of the language are IronPython, [[Jython]] and PyPy.

 * [[http://wiki.github.com/bjpop/berp/|Berp]] - an implementation of Python 3 in Haskell, providing an interactive environment as well as a compiler
 * [[CLPython]] - Python in Common Lisp
 * [[http://gcc.gnu.org/wiki/PythonFrontEnd|GCC Python Front-End]] - an in-progress effort to compile Python code within the GCC infrastructure
 * [[http://www.dcs.gla.ac.uk/~marks/|HotPy]] - a virtual machine for Python supporting bytecode optimisation and translation (to native code) using type information gathered at run-time
 * IronPython - Python in C# for the Common Language Runtime (CLR/.NET) and the [[http://fepy.sourceforge.net/|FePy]] project's IronPython Community Edition (IPCE)
 * [[Jython]] - Python in Java for the Java platform
 * PyMite - Python for embedded devices
 * PyPy - Python in Python, targeting several environments
 * [[http://pyjs.org/|pyjamas]] - a Python to !JavaScript compiler plus Web/GUI framework
 * [[http://code.google.com/p/pystachio/|Pystacho]] is, like Skulpt, Python in !JavaScript
 * [[http://students.ceid.upatras.gr/~sxanth/pyvm-2.0/|pyvm]] - a Python-related virtual machine and software suite providing a nearly self-contained "userspace" system
 * [[http://www.skulpt.org/|Skulpt]] - Python in !JavaScript
 * [[http://www.synapse-wireless.com/documents/whte_paper/SNAP_WP_102108.pdf|SNAPpy]] - "a subset of the Python language that has been optimized for use in low-power embedded devices" (apparently proprietary)
 * [[http://www.tinypy.org/|tinypy]] - a minimalist implementation of python in 64k of code
 * [[https://github.com/vic/typhon|Typhon]] - a [[http://rubini.us/|Rubinius]]-based implementation of Python

== Extensions ==

These are typically part of CPython (or some other implementation) but change the implementation's behaviour:

 * [[http://psyco.sf.net|Psyco]] - a just-in-time specialising compiler for CPython

== Compilers ==

These compilers usually implement something close to Python, although some compilers may impose restrictions that alter the nature of the language:

 * [[http://www.grant-olson.net/python/compyler|Compyler]] - an attempt to "transliterate the bytecode into x86 assembly" (now abandoned)
 * [[http://cython.org/|Cython]] - an optimising Python-to-C compiler, CPython extension module generator, and wrapper language for binding external libraries. Interacts with CPython runtime and supports embedding CPython in stand-alone binaries.
 * [[http://kayhayen24x7.homelinux.org/blog/nuitka-a-python-compiler/|Nuitka]] - a Python-to-C++ compiler using libpython at run-time, attempting some compile-time and run-time optimisations. Interacts with CPython runtime.
 * [[http://sourceforge.net/projects/pyc/|Pyc]] - performs static analysis in order to compile Python programs, uses similar techniques to Shed Skin
 * [[http://code.google.com/p/shedskin/|Shed Skin]] - a Python-to-C++ compiler, restricted to an implicitly statically typed subset of the language for which it can automatically infer efficient types through whole program analysis
 * [[http://code.google.com/p/unpython/|unPython]] - a Python to C compiler using type annotations

== Similar but Distinct Languages ==

These languages don't attempt to be directly compatible even with a subset of Python, choosing to provide their own set of features:

 * [[http://boo.codehaus.org/|Boo]]
 * [[Cobra]]
 * [[http://convergepl.org/|Converge]] - inspired by Python, Haskell, Icon and Smalltalk, provides macros which can be evaluated at compile-time
 * [[http://delight.sourceforge.net/|Delight]] - based on the D programming language
 * [[http://live.gnome.org/Genie|Genie]] - based on the same foundations (Gtk+, GNOME) as the Vala programming language, supposedly inspired by Boo
 * [[http://mython.org/|Mython]] - an extensible variant of the Python programming language, apparently a front-end for CPython
 * [[http://force7.de/nimrod/|Nimrod]] - statically typed, compiles to C, features parameterised types, macros, and so on
 * [[http://serpent.sourceforge.net/|Serpent]] - inspired by Python, supporting real-time garbage collection and multiple virtual machines in separate threads [[https://www.cs.cmu.edu/~music/aura/serpent-info.htm|(more information)]]
 * [[http://somefancy.com/trylon/|Trylon]] - inspired heavily by Smalltalk
 * [[http://mathias-kettner.de/wirbel.html|Wirbel]] - a compilable language with similar restrictions to Shed Skin (statically typed names, lists cannot mix elements of different types)

Comparisons:

 * Comparisons of [[http://jamiemcc.livejournal.com/12009.html?thread=225769#t225769|Genie and Wirbel]] and [[http://bkhome.org/genie/|Genie and Python]] by the lead developer of the Puppy Linux distribution
 * Some [[http://code.valaide.org/category/tags/genie|Genie code samples]] indicating the differences between that language and other Python variants

== Topic Guides ==

 * EmbeddedPython
 * PythonDistributions

== (Fun) Python Preprocessors ==

There are even some tongue-in-cheek dialects of Python which you might find fun.

  * [[http://www.staringispolite.com/likepython/|Like, Python]]
  * [[http://www.dalkescientific.com/writings/diary/archive/2007/06/01/lolpython.html|LOLPython]]
Line 9: Line 92:
"[http://phaseit.net/claird/comp.lang.python/python_varieties.html Cameron Laird's personal notes on varieties of Python implementation]". "[[http://phaseit.net/claird/comp.lang.python/python_varieties.html|Cameron Laird's personal notes on varieties of Python implementation]]".  Also of interest will be IntegratingPythonWithOtherLanguages, which, among other variants, mentions ''embeddings'' of Python in other languages.

Python Implementations

An "implementation" of Python should be taken to mean a program or environment which provides support for the execution of programs written in the Python language, as represented by the CPython reference implementation.

There have been and are several distinct software packages providing of what we all recognize as Python, although some of those are more like distributions or variants of some existing implementation than a completely new implementation of the language.

CPython Variants

These are implementations based on the CPython runtime core (the de-facto reference Python implementation), but with extended behaviour or features in some aspects.

  • CrossTwine Linker - a combination of CPython and an add-on library offering improved performance (currently proprietary)

  • Stackless Python - CPython with an emphasis on concurrency using tasklets and channels (used by dspython for the Nintendo DS)

  • Tiny Python - not to be confused with tinypy, below (link appears dead, cannot be verified)

  • unladen-swallow - "an optimization branch of CPython, intended to be fully compatible and significantly faster", originally considered for merging with CPython subject to PEP 3146, but now unmaintained

  • wpython - a re-implementation of CPython using "wordcode" instead of bytecode

Other Implementations

These are re-implementations of the Python language that do not depend on (or necessarily interact with) the CPython runtime core. Many of them reuse (a large part of) the standard library implementation.

Note that most of these project have not yet achieved language compliance. However, many of these have goals and features or run in certain environments that make them interesting in their own regard. The only implementations that are known to be compatible with a given version of the language are IronPython, Jython and PyPy.

  • Berp - an implementation of Python 3 in Haskell, providing an interactive environment as well as a compiler

  • CLPython - Python in Common Lisp

  • GCC Python Front-End - an in-progress effort to compile Python code within the GCC infrastructure

  • HotPy - a virtual machine for Python supporting bytecode optimisation and translation (to native code) using type information gathered at run-time

  • IronPython - Python in C# for the Common Language Runtime (CLR/.NET) and the FePy project's IronPython Community Edition (IPCE)

  • Jython - Python in Java for the Java platform

  • PyMite - Python for embedded devices

  • PyPy - Python in Python, targeting several environments

  • pyjamas - a Python to JavaScript compiler plus Web/GUI framework

  • Pystacho is, like Skulpt, Python in JavaScript

  • pyvm - a Python-related virtual machine and software suite providing a nearly self-contained "userspace" system

  • Skulpt - Python in JavaScript

  • SNAPpy - "a subset of the Python language that has been optimized for use in low-power embedded devices" (apparently proprietary)

  • tinypy - a minimalist implementation of python in 64k of code

  • Typhon - a Rubinius-based implementation of Python

Extensions

These are typically part of CPython (or some other implementation) but change the implementation's behaviour:

  • Psyco - a just-in-time specialising compiler for CPython

Compilers

These compilers usually implement something close to Python, although some compilers may impose restrictions that alter the nature of the language:

  • Compyler - an attempt to "transliterate the bytecode into x86 assembly" (now abandoned)

  • Cython - an optimising Python-to-C compiler, CPython extension module generator, and wrapper language for binding external libraries. Interacts with CPython runtime and supports embedding CPython in stand-alone binaries.

  • Nuitka - a Python-to-C++ compiler using libpython at run-time, attempting some compile-time and run-time optimisations. Interacts with CPython runtime.

  • Pyc - performs static analysis in order to compile Python programs, uses similar techniques to Shed Skin

  • Shed Skin - a Python-to-C++ compiler, restricted to an implicitly statically typed subset of the language for which it can automatically infer efficient types through whole program analysis

  • unPython - a Python to C compiler using type annotations

Similar but Distinct Languages

These languages don't attempt to be directly compatible even with a subset of Python, choosing to provide their own set of features:

  • Boo

  • Cobra

  • Converge - inspired by Python, Haskell, Icon and Smalltalk, provides macros which can be evaluated at compile-time

  • Delight - based on the D programming language

  • Genie - based on the same foundations (Gtk+, GNOME) as the Vala programming language, supposedly inspired by Boo

  • Mython - an extensible variant of the Python programming language, apparently a front-end for CPython

  • Nimrod - statically typed, compiles to C, features parameterised types, macros, and so on

  • Serpent - inspired by Python, supporting real-time garbage collection and multiple virtual machines in separate threads (more information)

  • Trylon - inspired heavily by Smalltalk

  • Wirbel - a compilable language with similar restrictions to Shed Skin (statically typed names, lists cannot mix elements of different types)

Comparisons:

Topic Guides

(Fun) Python Preprocessors

There are even some tongue-in-cheek dialects of Python which you might find fun.

This page aims to replace one formerly maintained as "Cameron Laird's personal notes on varieties of Python implementation". Also of interest will be IntegratingPythonWithOtherLanguages, which, among other variants, mentions embeddings of Python in other languages.

PythonImplementations (last edited 2023-06-24 04:21:27 by MaxBernstein)

Unable to edit the page? See the FrontPage for instructions.