Very complex Python/C++ embedding/extension question(s)
Ricardo B
etralex at ua.pt
Mon Sep 23 16:23:28 EDT 2002
On Sun, 22 Sep 2002 01:13:23 +0200, Bernhard Glueck wrote:
> Hi there
> I am developing a new multimedia/game/vr architecture, and at the moment
> i am trying to embed python as a scripting language. I have a slew of
> questions about the Python/C API..
>
>
Your architecture could do with some better explanation. Anyway, based on
that you can add new Actor/Type classes in run-time, I'll assume that
Actor/Type's child classes don't extend their parent's interface and that
you have a system where new classes can be dynamically registred.
Therefore, you only need a C++ to Python wrapper to the base class, and
you can use that wrapper for instances of child classes.
The same holds true for Python to C++ wrappers.
You should provide an interface for the childclasses written in Python to
register themselves and to see what classes are avaliable, the sameway you
do with the C++ classes.
About the third question:
Why don't you just use actor.Call("DoSomething", ...) in Python code, as
you do in C++?
You're just begging for increased confusion.
--
Ricardo
More information about the Python-list
mailing list