Source / source / features.txt

layout: page
title: Features

PyPy features

**PyPy 2.0.1** implements **Python 2.7.3** and runs on Intel
`x86 (IA-32)`_ , `x86_64`_ and `ARM`_ platforms (alpha), with PPC being
underway. It supports all of the core language, passing the Python test suite
(with minor modifications that were already accepted in the main python
in newer versions). It supports most of the commonly used Python
standard library modules.  For known differences with CPython, see our
`compatibility`_ page.

If you are interested in helping to move forward, see our `howtohelp`_ page.

.. _`compatibility`: compat.html
.. _`x86 (IA-32)`:
.. _`x86_64`:
.. _`ARM`:
.. _`howtohelp`: howtohelp.html


Our `main executable`_ comes with a Just-in-Time compiler.  It is
`really fast`_ in running most benchmarks.  `Try it out!`_

.. _`main executable`: download.html#with-a-jit-compiler
.. _`Try it out!`: download.html#with-a-jit-compiler
.. _`really fast`:


PyPy's *sandboxing* is a working prototype for the idea of running untrusted
user programs. Unlike other sandboxing approaches for Python, PyPy's does not
try to limit language features considered "unsafe". Instead we replace all
calls to external libraries (C or platform) with a stub that communicates
with an external process handling the policy.

To run the sandboxed process, you need `pypy-sandbox`_.  You also need to
get the `full sources`_ (step 1 only).  Run::

   cd pypy/pypy/translator/sandbox path/to/pypy-sandbox

You get a fully sandboxed interpreter, in its own filesystem hierarchy
(try ``os.listdir('/')``).  For example, you would run an untrusted
script as follows::

   mkdir virtualtmp
   cp virtualtmp/ --tmp=virtualtmp pypy-sandbox /tmp/

Note that the path ``/tmp/`` is a path inside the sandboxed
filesystem.  You don't have to put ```` in the real ``/tmp``
directory at all.

To read more about its features, try `` --help`` or go to
`our documentation site`_.

.. _`pypy-sandbox`: download.html#sandboxed-version
.. _`full sources`: download.html#translate
.. _`our documentation site`:


Support for Stackless_ and greenlets are now integrated in the normal
PyPy.  More detailed information is available here__.

.. _Stackless:
.. __:

Other features

PyPy has many secondary features and semi-independent
projects.  We will mention here:

* **the .NET backend:** There was a backend for building a native pypy
  for the .NET/CLI VM. Of particular interest was `the cli-jit
  branch`_, in which you could make a version of ``pypy-net`` which also
  contains a high-level JIT compiler (it compiled your Python programs
  Just in Time into CLR bytecodes). The code of this backend is very
  old by now and would require serious work to get back into a working
  state. If you would like to tackle this project, please `Contact us`_!

* **the Java backend:** PyPy can run on the Java VM, but more care is
  needed to finish this project. Writing a backend for our high-level 
  JIT compiler would be excellent.  `Contact us`_!

* **Other languages:**  we also implemented other languages that makes
  use of our RPython toolchain: Prolog_ (almost complete), as
  well as Smalltalk_, JavaScript_, Io_, Scheme_ and Gameboy_.

  There is also a Ruby implementation called Topaz_.

.. _`the cli-jit branch`:
.. _`contact us`: contact.html
.. _Prolog:
.. _Smalltalk:
.. _JavaScript:
.. _Io:
.. _Scheme:
.. _Gameboy:
.. _Topaz: