Embedding: Getting the module from a PyObject *
Bjoern.Giesler at stud.uni-karlsruhe.de
Bjoern.Giesler at stud.uni-karlsruhe.de
Tue Nov 23 13:11:40 EST 1999
Hi,
can anyone tell me how to get the module object that a certain instance's
class is defined in, from that instance?
In my code, I call PyImport_ImportModule(name). The module's Python code
defines a plugin object obj and calls CPlugin.register(obj), which maps
to the C function CPluginPyRegister().
In CPluginPyRegister, I want to add the module's PyObject * to an
internal structure so I can unload the module at some later time.
Phew, I hope this isn't too unclear. If anyone could help me, I'd be
extremely thankful.
--Bjoern
More information about the Python-list
mailing list