rev |
line source |
Hans-G?nter@25160
|
1 Cython is an optimising static compiler for both the Python programming
|
Hans-G?nter@25160
|
2 language and the extended Cython programming language (based on Pyrex).
|
Hans-G?nter@25160
|
3 It makes writing C extensions for Python as easy as Python itself.
|
Hans-G?nter@25160
|
4
|
Hans-G?nter@25160
|
5 Cython gives you the combined power of Python and C to let you
|
Hans-G?nter@25160
|
6
|
Hans-G?nter@25160
|
7 - write Python code that calls back and forth from and to C or C++ code
|
Hans-G?nter@25160
|
8 natively at any point.
|
Hans-G?nter@25160
|
9 - easily tune readable Python code into plain C performance by adding
|
Hans-G?nter@25160
|
10 static type declarations, also in Python syntax.
|
Hans-G?nter@25160
|
11 - use combined source code level debugging to find bugs in your Python,
|
Hans-G?nter@25160
|
12 Cython and C code.
|
Hans-G?nter@25160
|
13 - interact efficiently with large data sets, e.g. using multi-dimensional
|
Hans-G?nter@25160
|
14 NumPy arrays.
|
Hans-G?nter@25160
|
15 - quickly build your applications within the large, mature and widely
|
Hans-G?nter@25160
|
16 used CPython ecosystem.
|
Hans-G?nter@25160
|
17 - integrate natively with existing code and data from legacy, low-level
|
Hans-G?nter@25160
|
18 or high-performance libraries and applications.
|
Hans-G?nter@25160
|
19
|
Hans-G?nter@25160
|
20 The Cython language is a superset of the Python language that additionally
|
Hans-G?nter@25160
|
21 supports calling C functions and declaring C types on variables and class
|
Hans-G?nter@25160
|
22 attributes. This allows the compiler to generate very efficient C code
|
Hans-G?nter@25160
|
23 from Cython code.
|
Hans-G?nter@25160
|
24 The C code is generated once and then compiles with all major C/C++
|
Hans-G?nter@25160
|
25 compilers in CPython 2.6, 2.7 (2.4+ with Cython 0.20.x) as well as 3.3
|
Hans-G?nter@25160
|
26 and all later versions.
|
Hans-G?nter@25160
|
27 We regularly run integration tests against all supported CPython versions
|
Hans-G?nter@25160
|
28 and their latest in-development branches to make sure that the generated
|
Hans-G?nter@25160
|
29 code stays widely compatible and well adapted to each version.
|
Hans-G?nter@25160
|
30 PyPy support is work in progress (on both sides) and is considered mostly
|
Hans-G?nter@25160
|
31 usable since Cython 0.17. The latest PyPy version is always recommended here.
|
Hans-G?nter@25160
|
32
|
Hans-G?nter@25160
|
33 All of this makes Cython the ideal language for wrapping external C libraries,
|
Hans-G?nter@25160
|
34 embedding CPython into existing applications, and for fast C modules that
|
Hans-G?nter@25160
|
35 speed up the execution of Python code.
|