Lars Friedrich wrote: > I would like to work with some data using python/numpy. The data is > generated with C. To bring the data from C to python, I would like to > use ctype. I am using python 2.4.3 on a windows-System. > > To accomplish the described task, I have the following plan. Please tell > me, if this is possible, respectively if there is a better way. > > 1) In C, I write a .dll, that has a function > int foo(PyObject *arg)
I'm a bit confused here. I thought the primary point of ctypes was to be able to access existing, non-python-aware dlls from Python without writing C code. In this case, you're writing a dll that understands PyObjects (or, I assume, a particular PyObject -- a numarray). Why not just forget ctypes and write a regular old extension? Or use Pyrex, or Boost, or..... Maybe ctypes has some real advantages I don't get. -Chris -- Christopher Barker, Ph.D. Oceanographer NOAA/OR&R/HAZMAT (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Numpy-discussion mailing list Numpy-discussion@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/numpy-discussion