Embedding/Extending Python in/with C++: non-static members?
dmoore
damienlmoore at gmail.com
Thu Jul 19 16:24:01 EDT 2007
thanks for the responses Nick and "AnonMail"
> I'm doing a similar thing, and I would imagine others are also.
>
> 1. In a python file, set up wrapper functions that the python user
> actually uses (e.g FunctionA). Each function corresponds to a
> particular C/C++ extension function that you are exposing (e.g.
> CFunctionA).
>
...
> 4. Now when you enter you C/C++ function you can find your object by
> looking
> it up in some predefined table using the id. What we actually do is
> not use
> an integer but instead use a void pointer which is cast appropriately
> once
> inside C/C++. This avoids the lookup.
step 4 is smart :)
It's good to know that there is at least one data point of success
using the approach. I won't give up just yet.
More information about the Python-list
mailing list