complicated embedding question from newbie

Warren Postma embed at NOSPAM.geocities.com
Wed Aug 23 13:12:43 EDT 2000


"Fred Clift" <fred at cs.byu.edu> wrote in message
news:8o0uvf$sbb$1 at nnrp1.deja.com...
> Ok -- I have an existing C application with lots of complicated
> data-structures, lots of legacy things I can't change, etc.
>
> I want to embed python into this application.  I want data analysis and
> modification to be done by calling python functions
>
> (just finished my first fly-over of the embedding and extending chapters
> of 'Programming Python').
>
> My problem is that most of the data will need to be accessed from python
> and I dont think it would be the best thing to send copies of all the
> data into the function, and then perhaps parse output in C to know what
> parts of the data to change.
>

You might want to take a look at SWIG, which might be able to auto-generate
a good deal of this interfacing,
given just a header file that declares your C global variables, and
functions.

Warren





More information about the Python-list mailing list