[C++-sig] a question about embedding python in c++
David Toneian
david.toneian at gmail.com
Tue Oct 31 19:47:39 CET 2006
do i have to pass the instance to python and retrieve it again after
script execution to make the changes take effect?
for example, is it going to be like:
givePythonThatInstancePlease(&someInstance);
executeARandomScript();
someInstance=getTheInstanceBackAgain();
or is the last line not needed because python will have direct access
to the instance?
apropos direct access: is the python script manipulating the original
instance or is there some copying needed? That would be kind of "bad"
since one could not use classes with a lot of data in them or a lot of
encapsulation for applications where time is crucial (like games)....
oh, and sorry that i'm writing only pseudo-code, which may be quite
far from what the real approach with boost.python will look like. i
just didn't want to study the library functions and classes before i
was sure it would be useful to me :)
thanks for you fast answer
(mailing lists seem to be quite cool, i'm new to this)
More information about the Cplusplus-sig
mailing list