Converting a c array to python list

zefciu zefirek at Speacock.Pau.Apoznan.Mpl
Thu Mar 1 04:35:07 EST 2007


Hi!

I want to embed a function in my python application, that creates a
two-dimensional array of integers and passes it as a list (preferably a
list of lists, but that is not necessary, as the python function knows
the dimensions of this array).  As I read the reference, I see, that I
must first initialize a list object and then item-by-item put the values
to the list.  Is there any faster way to do it?  And is it worth to
implement?  The same problem is resolved in the current version by
calling a smaller c function (that counts just one element of the array)
many times.  Will it add much performance to the process?

zefciu



More information about the Python-list mailing list