Pyrex lets you write code that mixes Python and C data types any way you want, and compiles it into a C extension for Python.
Pyrex is Python with C types. It is specially designed to allow you to write extension modules for Python that have the speed of C and the simplicity and readability of Python.
You write your code in a Python-like language with C-typed variables, then use the pyrexc compiler to easily transform it into a C representation.
Requirements:
· Python 2.3 or later
What`s New in This Release: [ read full changelog ]
New features:
· C++ struct declarations, `new` operator, and del for C++ delete.
· As well as the `not None` modifier for extension type arguments, there is now `or None` to explicitly allow passing None. It is planned to make `not None` the default in a future version. For now, a warning is issued (once per Pyrex run) if you do not specify one or the other.
· Extension types may have a `nogc` option to suppress GC support.
Modifications:
· Exceptions caught by an except clause are no longer put into the thread state and cannot be retrieved using sys.exc_info(). To access the caught exception, it must be bound to a name in the except clause. A third name can be supplied to capture the traceback.
· PyString_InternFromString is now exposed under the name `cintern` because it is not a complete substitute for `intern` (it can`t handle strings containing null bytes). [John Arbash Meinel]
· Disabled size check for cimported types because it was generating too many false positives in the field. ...