All of that sounds sounds. But at what point were you trying to register a to-python converter? It sounded like you were trying to do that before importing the module, and since a to-python converter is by definition C++, I didn't understand how you could do it in a Python script before importing the module.

I'm registering the converter by calling the boost::python::import function in C++ code. I don't know any other way to do that.

Now, this give me another error. I'm trying to implement a "reload script" feature. I thought that all i had to do was to call Py_Finalize, then Py_Initialize again, and to remove any references i was holding to wrapping classes. But whenever i'm importing my extension again, i get the runtime error:

Assertion failed: slot->m_to_python == 0, file libs\python\src\converter\registry.cpp, line 212

which means my to_python converter have been registered once again. Is there a way to unregister them ? should i find a to not initialize the extension again ?

_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig

Reply via email to