From: Pauli V. <pau...@ik...> - 2006-11-07 19:00:49
|
Hi all, ti, 2006-11-07 kello 11:23 +0900, David Cournapeau kirjoitti: > I am trying to find a nice way to communicate between matlab and=20 > python. I am aware of pymat, which does that, but the code is=20 > deprecated, and I thing basing the code on ctypes would lead to much=20 > more robust code. >=20 > http://claymore.engineer.gvsu.edu/%7Esteriana/Software/pymat.html >=20 > I have a really simple prototype which can send and get back data from=20 > matlab, but I was wondering if it would be possible to use a scheme=20 > similar to ctypes instead of having to convert it by hand. A while ago I wrote a mex extension to embed the Python interpreter inside Matlab: http://www.iki.fi/pav/pythoncall I guess it's something like an inverse of pymat :) But I guess this is not really what you are looking for, since at present it just does a memory copy when passing arrays between Matlab and Python. Though, shared arrays might be just possible to implement if memory management is done carefully. BR, Pauli Virtanen |