[Cython] make extension type accesible from python?

Stefan Behnel stefan_ml at behnel.de
Mon Mar 3 14:14:09 CET 2008


Neal Becker wrote:
[real problem stripped]
> I assume there is some way to make extension types that can be used from
> python?  Of course, I'd want to be able to add other methods, so that, for
> example, intvec can be constructed and manipulated from python.

Yes, wrapping it in a Python extension type is the right approach here.


> Any simple examples I could look at?

The Pyrex docs, for example:

http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/extension_types.html

Stefan



More information about the Cython-dev mailing list