Linux SoftwareProgrammingInterpretersPyrex 0.9.4.1

Pyrex 0.9.4.1


Pyrex is a Language for Writing Python Extension Modules. Pyrex is a language specially designed for writing Python extension modu
Developer:   Greg Ewing
      more software by author →
Price:  0.00
License:   GPL (GNU General Public License)
File size:   0K
Language:   
OS:   
Rating:   0 /5 (0 votes)
Your vote:  
enlarge screenshot


Pyrex is a Language for Writing Python Extension Modules.

Pyrex is a language specially designed for writing Python extension modules. It's designed to bridge the gap between the nice, high-level, easy-to-use world of Python and the messy, low-level world of C.

You may be wondering why anyone would want a special language for this. Python is really easy to extend using C or C++, isn't it? Why not just write your extension modules in one of those languages?

Well, if you've ever written an extension module for Python, you'll know that things are not as easy as all that. First of all, there is a fair bit of boilerplate code to write before you can even get off the ground. Then you're faced with the problem of converting between Python and C data types. For the basic types such as numbers and strings this is not too bad, but anything more elaborate and you're into picking Python objects apart using the Python/C API calls, which requires you to be meticulous about maintaining reference counts, checking for errors at every step and cleaning up properly if anything goes wrong. Any mistakes and you have a nasty crash that's very difficult to debug.

Various tools have been developed to ease some of the burdens of producing extension code, of which perhaps SWIG is the best known. SWIG takes a definition file consisting of a mixture of C code and specialised declarations, and produces an extension module. It writes all the boilerplate for you, and in many cases you can use it without knowing about the Python/C API. But you need to use API calls if any substantial restructuring of the data is required between Python and C.

What's more, SWIG gives you no help at all if you want to create a new built-in Python type. It will generate pure-Python classes which wrap (in a slightly unsafe manner) pointers to C data structures, but creation of true extension types is outside its scope.
Another notable attempt at making it easier to extend Python is PyInline , inspired by a similar facility for Perl. PyInline lets you embed pieces of C code in the midst of a Python file, and automatically extracts them and compiles them into an extension. But it only converts the basic types automatically, and as with SWIG, it doesn't address the creation of new Python types.

Pyrex aims to go far beyond what any of these previous tools provides. Pyrex deals with the basic types just as easily as SWIG, but it also lets you write code to convert between arbitrary Python data structures and arbitrary C data structures, in a simple and natural way, without knowing anything about the Python/C API. That's right -- nothing at all! Nor do you have to worry about reference counting or error checking -- it's all taken care of automatically, behind the scenes, just as it is in interpreted Python code. And what's more, Pyrex lets you define new built-in Python types just as easily as you can define new classes in Python.

What's New in This Release:
  • Tiny bugfix to correct a tab/space problem in the distutils extension.
    tags data structures  the basic  basic types  the python  lets you  you can  python and  extension modules  without knowing  define new  about the  python types  code and  

    Download Pyrex 0.9.4.1


     http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/Pyrex-0.9.4.1.tar.gz


    Authors software

    Pyrex 0.9.4.1 (by Greg Ewing)
    Pyrex is a Language for Writing Python Extension Modules.

    Pyrex is a language specially designed for writing Python extension modu


    Similar software

    Pyrex 0.9.4.1 (by Greg Ewing)
    Pyrex is a Language for Writing Python Extension Modules.

    Pyrex is a language specially designed for writing Python extension modu

    PyICU 0.5 (by Andi Vajda)
    PyICU is a python extension wrapping IBM's ICU C++ API.

    PyICU is supported on Linux, Mac OS X and Windows

    IVuPy 0.1 (by Gerard Vermeulen)
    IVuPy (I-View-Py) aims to be a solid basis for large Qt based Python programs geared to data analysis and 3D visualization of huge da

    Python-SIP 4.5.2 (by Phil Thompson)
    One of the features of Python that makes it so powerful is the ability to take existing libraries, written in C or C++, and make them

    python-shbuf 0.0.4 (by Lennart Poettering)
    python-shbuf project is a simple Python extension for accessing libshbuf shared buffers.

    Requirements:
    · python-shbuf was develop

    Python 2.5 (by Guido van Rossum)
    Python is an interpreted, interactive, object-oriented programming language

    python-libcommon 1.2.0 (by PimenTech)
    python-libcommon contains Map, Set, and Graph data types for Python

    python-gdkinput 1.0 (by Fabien COUTANT)
    python-gdkinput is a Python binding for the gdk_input_add and gdk_input_remove functions missing in PyGtk

    PyYAML 3.04 (by Kirill Simonov)
    PyYAML project is a YAML emitter and parser for Python

    odirect 0.70 (by Dan Stromberg)
    When reading a lot of data from disk or network filesystem, e.g


    Other software in this category

    ScummVM 0.9.1 (by James Brown)
    ScummVM project is a 'virtual machine' for several classic graphical point-and-click adventure games.

    It is designed to

    Funkee 0.9 (by Joshua Turner)
    Funkee is a cross-platform scripting host built on top of the Java Virtual Machine and the Groovy scripting language

    Perl 5.8.8 (by The Perl Foundation)
    Perl is a stable, cross platform programming language

    Python 2.5 (by Guido van Rossum)
    Python is an interpreted, interactive, object-oriented programming language

    Tcl/Tk 8.5a5 (by Tcl Core Team)
    Tcl provides a portable scripting environment for Unix, Windows, and Macintosh that supports string processing and pattern matching,

  •     search


    Featured Software

    jEdit 4.3 pre8
    jEdit is an Open Source text editor written in Java

    Opera 9.02
    Surf the Internet in a safer, faster, and easier way with Opera browser

    GNU Aspell 0.60.4
    GNU Aspell is a Free and Open Source spell checker designed to eventually replace Ispell


    Subscribe in Rojo
    Google Reader
    Add to My Yahoo!

    Add to My AOL
    Subscribe with Bloglines
    Subscribe in NewsGator Online
    Add 'nixbit linux software' to Newsburst from CNET News.com
    del.icio.us nixbit linux software


    Top tags