Source

pypy.org / features.html

Full commit
<!DOCTYPE html>
<html>
<head>
	<title>PyPy :: Features</title>
	<meta http-equiv="content-language" content="en" />
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<meta name="author" content="PyPy Team" />
	<meta name="description" content="PyPy" />
	<meta name="copyright" content="MIT" />
	<meta name="document-rating" content="general" />
	<link rel="stylesheet" type="text/css" media="screen" title="default" href="css/site.css" />
	<link rel="alternate" type="application/rss+xml" title="RSS Feed for PyPy" href="http://feeds.feedburner.com/PyPyStatusBlog" />
  <link rel="stylesheet" type="text/css" href="css/jquery-ui-1.8.14.custom.css" />
	<script type="text/javascript" src="http://use.typekit.com/hdt8sni.js"></script>
	<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
  <script type="text/javascript" src="js/jquery-ui-1.8.14.custom.min.js"></script>
  <script type="text/javascript" src="js/detect.js"></script>
  <script type="text/javascript" src="js/script2.js?bust=1"></script>
</head>
<body>
<script type="text/javascript">
	var _gaq = [['_setAccount', 'UA-7778406-3'], ['_trackPageview']];
	if (document.location.protocol !== 'file:') {
		(function() {
			var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
			ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
			(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
		})();
	}
</script>
<div id="body-outer"><div id="body-inner"><div id="body" class="clearfix">
<div id="header">
	<div id="menu-follow">
		<div><a href="http://search.twitter.com/search?q=%23pypy" title="Follow the conversation on Twitter"><img src="http://static.ampify.it/icon.twitter.gif" alt="Follow the conversation on Twitter" width="14px" height="14px" /></a></div>
    <div><a href="https://bitbucket.org/pypy/pypy"><img src="http://www.selenic.com/hg-logo/logo-droplets-25.png" width="14px" height="14px" /></a></div>
		<div><a href="http://feeds.feedburner.com/PyPyStatusBlog" title="Subscribe to the RSS Feed"><img src="http://static.ampify.it/icon.rss.png" alt="Subscribe to the RSS Feed" width="14px" height="14px" /></a></div>
	</div>
	<div id="logo"><a href="http://pypy.org"><img src="image/pypy-logo.png" alt="PyPy" height="110px" /></a></div>
	<hr class="clear-left" />
	<div id="menu-sub"><a href="index.html">Home</a><span class="menu-sub-sep"> | </span><a href="features.html">Features</a><span class="menu-sub-sep"> | </span><a href="download.html">Download</a><span class="menu-sub-sep"> | </span><a href="compat.html">Compatibility</a><span class="menu-sub-sep"> | </span><a href="performance.html">Performance</a><span class="menu-sub-sep"> | </span><a href="http://doc.pypy.org">Dev Documentation</a><span class="menu-sub-sep"> | </span><a href="http://morepypy.blogspot.com">Blog</a><span class="menu-sub-sep"> | </span><a href="people.html">People</a><span class="menu-sub-sep"> | </span><a href="contact.html">Contact</a><span class="menu-sub-sep"> | </span><a href="py3donate.html">Py3k donations</a><span class="menu-sub-sep"> | </span><a href="numpydonate.html">NumPy donations</a><span class="menu-sub-sep"> | </span><a href="tmdonate.html">STM/AME donations</a></div>
	<hr class="clear" />
</div>
<div id="content">
<div>
<div id="main">
<h1 class="title">Features</h1>
<p><strong>PyPy 2.0 beta1</strong> implements <strong>Python 2.7.3</strong> and runs on Intel
<a class="reference external" href="http://en.wikipedia.org/wiki/IA-32">x86 (IA-32)</a> , <a class="reference external" href="http://en.wikipedia.org/wiki/X86_64">x86_64</a> and <a class="reference external" href="http://en.wikipedia.org/wiki/ARM">ARM</a> platforms, 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
<a class="reference external" href="compat.html">compatibility</a> page.</p>
<p>If you are interested in helping to move forward, see our <a class="reference external" href="howtohelp.html">howtohelp</a> page.</p>
<div class="section" id="speed">
<h1>Speed</h1>
<p>Our <a class="reference external" href="download.html#with-a-jit-compiler">main executable</a> comes with a Just-in-Time compiler.  It is
<a class="reference external" href="http://speed.pypy.org/">really fast</a> in running most benchmarks.  <a class="reference external" href="download.html#with-a-jit-compiler">Try it out!</a></p>
</div>
<div class="section" id="sandboxing">
<h1>Sandboxing</h1>
<p>PyPy's <em>sandboxing</em> 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 &ldquo;unsafe&rdquo;. Instead we replace all
calls to external libraries (C or platform) with a stub that communicates
with an external process handling the policy.</p>
<p>To run the sandboxed process, you need <a class="reference external" href="download.html#sandboxed-version">pypy-sandbox</a>.  You also need to
get the <a class="reference external" href="download.html#translate">full sources</a> (step 1 only).  Run:</p>
<pre class="literal-block">
cd pypy/pypy/translator/sandbox
pypy_interact.py path/to/pypy-sandbox
</pre>
<p>You get a fully sandboxed interpreter, in its own filesystem hierarchy
(try <tt class="docutils literal"><span class="pre">os.listdir('/')</span></tt>).  For example, you would run an untrusted
script as follows:</p>
<pre class="literal-block">
mkdir virtualtmp
cp untrusted.py virtualtmp/
pypy_interact.py --tmp=virtualtmp pypy-sandbox /tmp/untrusted.py
</pre>
<p>Note that the path <tt class="docutils literal">/tmp/untrusted.py</tt> is a path inside the sandboxed
filesystem.  You don't have to put <tt class="docutils literal">untrusted.py</tt> in the real <tt class="docutils literal">/tmp</tt>
directory at all.</p>
<p>To read more about its features, try <tt class="docutils literal">pypy_interact.py <span class="pre">--help</span></tt> or go to
<a class="reference external" href="http://pypy.readthedocs.org/en/latest/sandbox.html">our documentation site</a>.</p>
</div>
<div class="section" id="stackless">
<h1>Stackless</h1>
<p>Support for <a class="reference external" href="http://www.stackless.com/">Stackless</a> and greenlets are now integrated in the normal
PyPy.  More detailed information is available <a class="reference external" href="http://doc.pypy.org/en/latest/stackless.html">here</a>.</p>
<p>Note that there is still an important performance hit for programs using
Stackless features.</p>
</div>
<div class="section" id="other-features">
<h1>Other features</h1>
<p>PyPy has many secondary features and semi-independent
projects.  We will mention here:</p>
<ul class="simple">
<li><strong>the .NET backend:</strong> you get a version of <tt class="docutils literal"><span class="pre">pypy-net</span></tt> that runs
natively in the .NET/CLI VM.  Of particular interest is <a class="reference external" href="https://bitbucket.org/pypy/pypy/src/cli-jit">the cli-jit
branch</a>, in which you can make a version of <tt class="docutils literal"><span class="pre">pypy-net</span></tt> which also
contains a high-level JIT compiler (it compiles your Python programs
Just in Time into CLR bytecodes, which are in turn compiled natively
by the VM).</li>
<li><strong>the Java backend:</strong> 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.  <a class="reference external" href="contact.html">Contact us</a>!</li>
<li><strong>Other languages:</strong>  we also implemented other languages that makes
use of our RPython toolchain: <a class="reference external" href="https://bitbucket.org/cfbolz/pyrolog/">Prolog</a> (almost complete), as
well as <a class="reference external" href="https://bitbucket.org/pypy/lang-smalltalk/">Smalltalk</a>, <a class="reference external" href="https://bitbucket.org/pypy/lang-js/">JavaScript</a>, <a class="reference external" href="https://bitbucket.org/pypy/lang-io/">Io</a>, <a class="reference external" href="https://bitbucket.org/pypy/lang-scheme/">Scheme</a> and <a class="reference external" href="https://bitbucket.org/pypy/lang-gameboy/">Gameboy</a>.</li>
</ul>
</div>
</div>
<div id="sidebar">
</div>
</div>
</div>
</div></div></div>
</body>
</html>