En Tue, 13 Mar 2007 03:33:43 -0300, Frank <[EMAIL PROTECTED]> escribió:
> I want to parse an array M1 from python to a cpp function fct which > returns an array M2. > > How can I do this best? Is SWIG appropriate or is there something > else? If you're going to call a single function, declare it with extern "C" (or write a wrapper function) and use ctypes from Python. Try to keep the memory allocation in Python: instead of returning another array, make the function use the *same* input array, or give it -from Python- a previously allocated array. ctypes comes with Python 2.5, and you can download and install it for previous versions too. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list