python/C++ wrapper

Roman Yakovenko roman.yakovenko at gmail.com
Wed Mar 14 02:11:05 EDT 2007


On 13 Mar 2007 21:55:55 -0700, Frank <supervau at gmail.com> wrote:
>
> Hi,
>
> is there anyone here that calls C++ programs from python via swig? It
> seems that there are a lot of different ways to do that. For me it
> would be important that the original c++ code (which is available)
> does not need to be changed and the whole compilation process (swig -
> python.... g++....etc) is as simple as possible.
>
> Does anyone have a running example of the following problem:
>
> - A c++ program receives a 2D-matrix from python as input and gives a
> 2D-matrix as output back to python.
>
> That's all! I would expect there should be someone who actually uses
> swig for this kind of problem. If so, could you send me the code, that
> would be great!

If this is all you need, than may be you don't need to use any code
generator, but try
some other way: Boost.Python. Take a look on tutorials:
http://www.boost.org/libs/python/doc/tutorial/doc/html/python/exposing.html


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Python-list mailing list