Think, that I'm still at the wrong track. Point is that I cannot find any examples and don't know where to start here. Perhaps my problem boils down to two questions: I'd like to pass lists (in some cases nested ones) from Python to C and convert those Python-lists to C-arrays (e. g. of doubles). My second wish is to return a C-array of longs to a Python list.
My approach so far: static PyObject *_foo(PyObject *self, PyObject *args) { double *v; if (!PyArg_Parse(args, "(d)", &v)) return NULL; // then I can't access v like v[1] ... <snip> // then return *v return with something like PyBuildValue (but didn't get so far) } Can somebody give me a hint here, please? Passing simple arguments to and fro (e. g. single integer values) is no problem, but lists of unknown size? TIA Christian -- http://mail.python.org/mailman/listinfo/python-list