Question concerning array.array and C++

F

Fabio

Hi All,
I have a question concerning the use of array.array inside of C++ code I
wrote.

I am working with _big_ data files but some entries in these files are
usually bounded say between -5 to 40. Returning a Python list makes no
sense. In Python I always work with the array.array module which does
the trick. But now that I wrote my own C++ module for some preprocessing
I need the return array.array objects.

Consider the object

array.array('c',[40,40,40])

Can I create such an object from within the C++ layer and pass it to the
Python layer?

I already looked at arraymodule.c and tried to link the arraymodule.o
file to my code but then I have to mess around with extern "C" and the
like and it gets really messy.

Any help would be great!

Fabio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,158
Latest member
Vinay_Kumar Nevatia
Top