How to transfer data structure or class from Python to C/C++?

Aaron Brady castironpi at gmail.com
Tue Oct 21 13:21:45 EDT 2008


On Oct 21, 12:46 am, "Gabriel Genellina" <gagsl-... at yahoo.com.ar>
wrote:
> En Fri, 17 Oct 2008 20:03:44 -0300, Aaron "Castironpi" Brady  
> <castiro... at gmail.com> escribió:
>
>
>
> > On Oct 16, 9:10 am, Hongtian <hongtian.i... at gmail.com> wrote:
> >> Not exactly.
>
> >> In my C/C++ application, I have following function or flow:
>
> >> void func1(....)
> >> {
> >>     call PyFunc(struct Tdemo, struct &Tdemo1);
>
> >> }
>
> >> I mean I want to invoke Python function 'PyFunc' and transfer a data
> >> structure 'Tdemo' to this function. After some process in Python, I
> >> want it return 'Tdemo1' back to the C/C++ application.
>
> >> I research boost.python and think it is not a reasonable solution
> >> because it make the C/C++ application too complex.
>
> >> Thanks.
> > snip
>
> > Solution produced here.  Includes dirty kludge, which will welcome
> > correction.
snip
>
> --
> Gabriel Genellina

Hi Gabriel,
Sorry, did you have some questions about it?



More information about the Python-list mailing list