Embeding Py: failed to instantiate a class

2005-03-22 Thread Brano Zarnovican
Hi ! I need to import a module and create an instance of a class from that module (in C). import mod o = mod.klass() (mod.klass is a subclass of tuple) When I receive a class object from the module.. module = PyImport_ImportModule("mod") cls = PyObject_GetAttrString(module, "klass") ..it fail

Embeding Py: failed to instantiate a class

2005-03-21 Thread Brano Zarnovican
Hi ! I need to import a module and create an instance of a class from that module (in C). import mod o = mod.klass() (mod.klass is a subclass of tuple) When I receive a class object from the module.. module = PyImport_ImportModule("mod") cls = PyObject_GetAttrString(module, "klass") ..it fail