Holger Brandsmeier gmx.de> writes:
>
> Ashish,
>
> if you really need it to be a `list` in python, then there is no way
> around it, you have to copy it. If you just need it to behave like a
> list, then that is possible. Just export your struct to python and
> implement methods such as __get__
Ashish,
if you really need it to be a `list` in python, then there is no way
around it, you have to copy it. If you just need it to behave like a
list, then that is possible. Just export your struct to python and
implement methods such as __get__(), __set__(), __len()__, __eq__(),
...
You may al
Ashish Sadanandan gmail.com> writes:
>
> I have a struct that contains a C-style array data member. I'd like to have
> this struct exposed to Python, and this data member be accessible as a tuple
> in Python.
>
> struct S
> {
> char arr[10];
> };
>
>
> So the question is, how can I expose t