The Cython Project

I'm happy to assist at the birth of the Cython project, an advanced fork of the Pyrex code generator.

Why was Cython born? - First of all, because Pyrex is great. It was designed and implemented by Greg Ewing and allows you to write C extensions for the Python interpreter more or less in Python and to have them automatically translated into C code - including all the tedious ref-counting and other beauties of the Python C-API. lxml is a great example for what it can achieve, and a great example for wrapping external C libraries with Pyrex/Cython.

However, over the years, it has shown that the original author has become a bottleneck in the further development of Pyrex. A lot of contributed patches never made it into the official distribution, and several people started branching off their own enhanced versions of Pyrex. The Cython project aims to integrate these patches back into an official distribution, and to further enhance the Cython compiler in a community effort.

Cython already supersedes Pyrex in a couple of ways. It works on 64 bit systems with Python 2.5 (Py_ssize_t). It supports list comprehensions and the conditional statements of Python 2.5. It knows about several Python types and can generate optimized code for them. It can generate glue code for a C level API between extension modules (a feature that lxml makes heavy use of already).

And: it is an open project with an open bug tracker and an open, distributed version control system (mercurial). And the new maintainers are happy to receive contributions, and to integrate them into a mainstream distribution.

So, in case you ever wondered if Pyrex couldn't do a little more of what you need - go and give Cython a try. It may already be what you need, but it is most likely close to what you want. And any help to get it even closer is warmly appreciated.