You could use the reload() function in python 2.7 or imp.reload() in python 3.
It takes a module object as argument.
Thanks. However it wouldn't reset to the initial state in the general
case. All modules needs to be unloaded. I don't know a safe way to it
yet. I'm just sure i want to do it in c++ not in Python.
I've just found that the call of Py_Finalize with Boost.Python is a
known issue, already discussed on this mailing list and that the manual
says not to call it :
http://www.boost.org/doc/libs/1_47_0/libs/python/doc/tutorial/doc/html/python/embedding.html
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig