[Cython] Custom automatic type conversions from/to C++

Olivier Parcollet oparcollet.triqs at gmail.com
Sun Nov 4 23:32:55 CET 2012


I would like to write some automatic C++/python conversionsfor the
classes of my project
in addition to std::vector and others std:: objects.

Conversions for std:: objects are written in
Cython/Utility/CppConvert.pyx, i.e. an internal cython file.

The question is then simply to load another CppConvert.pyx file that
would be project dependent.
Is there already a way to do it ?
or a plan to do provide such user defined conversions ?

I made a simple patch to load also another CppConvert.pyx from the
current directory,
which works for my code, but I would welcome a more general solution...



More information about the cython-devel mailing list