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

Firestar dwjoker at
Thu Nov 8 23:18:22 CET 2001


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


More information about the Python-list mailing list