How does a C API-function returns a list to python

torsten.maass at torsten.maass at
Sun Jan 12 21:08:50 CET 2003


I want to write a communication-functions set for a special
hardware component for python using C API.

Does anybody know if and how it is possible to return a list 
to python from a read C-Array.

c-function myfunction:

double a[5]={1.0,2.0,3.0,4.0,5.0};
return Py_BuildValue("???",a)

>>>  a=[0.0,0.0,0.0,0.0,0.0]
>>>  a=myfunction.command(some_args)
>>>  a

More information about the Python-list mailing list