mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / Cython.mdwn
1 [Cython][] is a Python-like language that makes it easy to write
2 [[C]]-based extensions for [[Python]].  This is a Good Thing™, because
3 people who will write good Python wrappers will be fluent in Python,
4 but not necessarily in C.  Alternatives like [[SWIG]] allow you to
5 specify wrappers in a C-like language, which makes thin wrappers easy,
6 but can lead to a less idomatic wrapper API.  I should also point out
7 [ctypes][], which has the advantage of avoiding compiled wrappers
8 altogether, at the expense of dealing with linking explicitly in the
9 Python code.
10
11 The [Cython docs][docs] are fairly extensive, and I found them to be
12 sufficient for writing my [[pycomedi]] wrapper around the [[Comedi]]
13 library.  One annoying thing was that Cython does not support
14 `__all__` ([cython-users][]).  I took [a stab at fixing this][github],
15 but got sidetracked cleaning up the Cython parser ([cython-devel][],
16 [later in cython-devel][later]).  I must have bit off more than I
17 should have, since I eventually ran out of time to work on merging my
18 code, and the Cython trunk moved off without me ;).
19
20
21 [Cython]: http://cython.org/
22 [ctypes]: http://docs.python.org/library/ctypes.html
23 [docs]: http://docs.cython.org/
24 [cython-users]:
25   http://groups.google.com/group/cython-users/browse_thread/thread/a17bb0f5e550c140
26 [github]: https://github.com/wking/cython/branches
27 [cython-devel]:
28   http://mail.python.org/pipermail/cython-devel/2011-February/000035.html
29 [later]:
30   http://mail.python.org/pipermail/cython-devel/2011-March/000163.html
31
32 [[!tag tags/tools]]
33 [[!tag tags/C]]
34 [[!tag tags/Python]]