Sunday, December 14, 2008

swig and python with Extension module

There is a much simpler way to create interface to C/C++ code. Simply use Extension module from distutils.core (
You simply have to type sudo python install and you can access your module in python. (import example; example.cube(3))

Thanks to PA recommendation.
My next steps are to create a python interface to flayers (my C++ neural network library) and convert arguments. PA suggest boost.python for arguments conversions.

I have also experience setup module from setuptools to create mlboost file. setuptools use indirectly easy_install that doesn't work as well as aptitude on ubuntu. Unfortunatly, matplotlib dependency doesn't work but it is included in scipy through mlab interface.

No comments:

Post a Comment