Nov. 3, 2006
6:27 p.m.
Hello everyone, I've got a C++ object that I've created a Python type for. When I insert the object into the main module using PyModule_AddObject then I can instantiate it in Python and everything works just fine. I assumed (mostly from reading other's code) that I could use something like: PyDict_SetItemString(MainDict,"x",pMyObject) To get a variable called "x" into my python environment that IS the same instance as that pointed to by pMyObject. Then by running PyRun_SimpleString("x.somefunction()\n") I could make use of pMyObject from within Python. This doesn't work, my application crashes. What is the best way to accomplish this using the Py??? functions from the Python API? Beau
7130
Age (days ago)
7130
Last active (days ago)
0 comments
1 participants
participants (1)
-
Beau Sapach