Two way communication between a python class and a C++ class

Firestar dwjoker at thenorth.org
Thu Nov 8 17:18:22 EST 2001


Hi,

I am having a problem obtaining two way communication between a python
class and a c++ class. I can get a python class to communcate with a
c++ class and a c++ class to communicate with a python class, but i
cannot seem to get the communication to go both ways.

i.e I have a class CTest in c++ and a class PTest in python and when i
create an instance of CTest in c++ it creates an instance of PTest in
python, i then want PTest to be able to call methods in the instance
of CTest that created the instance of PTest. How can i do this? there
seems to be no way to pass the c++ pointer into the python class in
the constructor...

There must be a way... does anyone know how to do this??? Help much
appreciated!!

Firestar



More information about the Python-list mailing list