Unpacking a python list in C?

Alex Martelli aleax at aleax.it
Thu May 2 13:06:36 EDT 2002


<posted & mailed>

Richard P. Muller wrote:

> I need some help with extending python in C. I want to call a function
> of a list from python:
> 
> answer = my_function(my_list)
> 
> where my_function is a function, and my_list is a python list of floats.
> I want my_function to be a C function, and want to extract my_list into
> an integer length and a double * pointing to the values. I spent some

The following is a rather long URL, but it identifies a post I posted
last week which exactly answers this specific question:

http://groups.google.com/groups?q=double+list+malloc+author:alex+author:martelli&hl=en&as_drrb=b&as_mind=12&as_minm=4&as_miny=2002&as_maxd=2&as_maxm=5&as_maxy=2002&selm=jPfy8.65668%24vF6.2006478%40news2.tin.it&rnum=1


Alex




More information about the Python-list mailing list