¿Porque estoy usando swig? Pues sencillo porque en otra parte del proyecto se ha usado para acceder a C++.
Pero buscando información me he encontrado con que hay alternativas:
Parece que la gente del grupo de python o que menos le gusta es SWIG. Por ejemplo:
"The best thing to do is to offer your C++-lib with a C-style interface. Then you can use python's ctypes (included since python2.5) to access the shared library.
If you insist on using C++, you can expose the lib using several available wrapper generators. I know of three: SIP, Swig & Boost::Python. The first I've got some very good first-hand experience. The second is somewhat primitive IHMO. The third I never used. "
El que diga que ctypes está incluido desde python2.5 no quiere decir que no se pueda usar con versiones anteriores.
Al respecto ver los mitos sobre swig.
Otro módulo interesante es pyrex.
No hay comentarios:
Publicar un comentario