Converting C++ array into Python

Larry Bates larry.bates at websafe.com
Wed Oct 12 18:13:52 CEST 2005


Like others, without more information on what you have tried we are
just guessing.  Many times I've used the struct.unpack() module to
unpack C "arrays" into python objects.  Don't know if this will help,
but thought I'd pass it along.  Post some code and we can help more.

-Larry Bates

Adriaan Renting wrote:
> try using SWIG?
> You give very little information about how you are trying to accomplish this. From your mention of C++ you seem to mean a vector, not an array, I suggest you read the documentation of SWIG, and maybe someone can help you if you give a clear example of what you are trying to accomplish, how, and why it fails.
> 
> Adriaan Renting.  
>   
> 
>>>>"Deshdeep, Singh (IE10)" <Deshdeep.Singh at honeywell.com> 10/04/05 7:33 am >>> 
> 
> 
>  I am extending C++ application with python. I am not able to convert a C++ array in Python.    
>      
>  If anyone has the experience of the below :-   
>   1)            How to handle the C++ array in the Python code and how to input that from the script ?   
>      
>  Awaiting for the solution   
>      
>  Regards   
>  DD   
>      



More information about the Python-list mailing list