Transparent C++ & Python twin classes?
Aaron Drew
ripper at hotkey.net.au
Sun Apr 15 21:35:03 EDT 2001
I'm looking into using Python as a scripting language for a game but I'm
having trouble finding documentation regarding dual representations of class
instances as both python accessible objects and C++ class instances.
I need to write the bulk of the code in C++ and require use of C++ class
attributes.
All of the examples I've seen of python to C++ extensions seem to avoid the
problem of C++ class attributes by declaring extern "C" functions as python
class methods and calling the results a python/C++ bridge. Is it possible
for me to store, say 'int x' in a C++ class and refer to it as myobject.x in
python?
Regards,
Aaron Drew
More information about the Python-list
mailing list