Size: 969
Comment:
|
← Revision 21 as of 2016-07-17 03:50:47 ⇥
Size: 1542
Comment: added PyPy link and made notation about psyco being unmaintained
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
Pyrex is a python-like language for writing python extension modules. It can be described as python with C data types. You can produce with it code as fast as in C and access to C libraries is easy. |
Pyrex is a Python-like language for rapidly and easily writing python extension modules. It can be described as python with C data types. With Pyrex, one can produce Python-like code that runs as fast as in C, with easy access to C libraries and functions. |
Line 5: | Line 4: |
Homepage at http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ | The Pyrex homepage is at http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/ |
Line 7: | Line 6: |
Two main purposes of Pyrex usage are: * speed up a Python code * provide Python interface to existing C modules/libraries |
The two main uses of Pyrex are: * To speed up the execution of Python code * To provide a Python interface to existing C modules/libraries |
Line 11: | Line 10: |
For an example of speedup see [http://www.eby-sarna.com/pipermail/source-changes/2002q4/000749.html this message]. | For '''examples''' of the speedup that Pyrex provides, see [[http://www.eby-sarna.com/pipermail/source-changes/2002q4/000749.html|this message]]. or [[http://www.prescod.net/python/pyrexopt/optimization.html|this page]]. |
Line 13: | Line 13: |
More examples and ideas at [http://www.prescod.net/python/pyrexopt/optimization.html]. | There is an enhanced fork of Pyrex, called [[http://www.cython.org|Cython]]. It features substantial performance optimisations and improved support for newer Python language features. |
Line 15: | Line 15: |
You can also consider other Python speedup solutions: http://psyco.sf.net and ["weave"]. | PyrexOnWindows provides a step-by-step guide to '''Pyrex installation on Windows'''. |
Line 17: | Line 17: |
[http://www.freenet.org.nz/python/pyrexdoc pyrexdoc] is a tool for generating HTML documentation from a compiled Pyrex module, by DavidMcNab. See other DocumentationTools. | [[http://www.freenet.org.nz/python/pyrexdoc|pyrexdoc]] is a tool for '''generating HTML documentation''' from a compiled Pyrex module, by DavidMcNab. See other DocumentationTools. |
Line 19: | Line 19: |
For a step-by-step guide to install to install Pyrex on Windows, see this:PyrexOnWindows | If you are looking for speed improvement, you may also want to consider '''other Python speedup solutions''' such as [[PyPy]] and [[weave]]. PyPy's spiritual predecessor, [[http://psyco.sf.net|psyco]], has been deprecated and is no longer actively maintained. For accessing existing C libraries, the '''ctypes''' module is also available in Python 2.5 and above. |
Pyrex is a Python-like language for rapidly and easily writing python extension modules. It can be described as python with C data types. With Pyrex, one can produce Python-like code that runs as fast as in C, with easy access to C libraries and functions.
The Pyrex homepage is at http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
The two main uses of Pyrex are:
- To speed up the execution of Python code
- To provide a Python interface to existing C modules/libraries
For examples of the speedup that Pyrex provides, see this message. or this page.
There is an enhanced fork of Pyrex, called Cython. It features substantial performance optimisations and improved support for newer Python language features.
PyrexOnWindows provides a step-by-step guide to Pyrex installation on Windows.
pyrexdoc is a tool for generating HTML documentation from a compiled Pyrex module, by DavidMcNab. See other DocumentationTools.
If you are looking for speed improvement, you may also want to consider other Python speedup solutions such as PyPy and weave. PyPy's spiritual predecessor, psyco, has been deprecated and is no longer actively maintained.
For accessing existing C libraries, the ctypes module is also available in Python 2.5 and above.