Calling cpp from python/SWIG

Frank supervau at
Tue Mar 13 05:42:55 CET 2007


I have the following problem:

I want to call a cpp program from python. Let's call this cpp program
fct. The problem is that I will parse a large array, say M1, to fct
and also receive a large array, say M2 back (each about 1000 x 1000).

Normally, I would write M1 to a file, call fct via
write M2 in a file within fct, and read M2 with python.

I followed some threads discussing the use of swig in this context.

My questions are:

- is SWIG the best solution for my problem
- are there other ways besides SWIG
- can I find somewhere examples how to do that exactly

Thanks to all!


More information about the Python-list mailing list