List Info

Thread: Calling reload() or PyImport_ReloadModule on modules implementing Boost.Python extensions




Calling reload() or PyImport_ReloadModule on modules implementing Boost.Python extensions
country flaguser name
United States
2008-04-26 09:13:25
Hello ladies and gents,

I've been struggling for a day trying to get a system I've
built using 
Boost.Python to be able to reload modules which hold python
classes which 
derive from a C++ class via Boost.Python. I've tried both
the 
PyImport_ReloadModule command and attempting to affect a
reload internally 
from python via reload(). Niether has resulted in success.
My question to 
the community is if anyone knows if this is even possible
from a C++ 
extension with the current Boost.Python library? The code in
question 
doesn't involve a recompile of any C++ dlls.. I only want to
be able to make 
small changes to python scripts and then be able to reload
them and 
reinstantiate associated instances of their classes without
restarting my 
application. Is the answer to abandon Boost.Python and just
go for a raw 
implementation via the C API?

Cheers,

Brandon 


_______________________________________________
C++-sig mailing list
C++-sigpython.org
http:
//mail.python.org/mailman/listinfo/c++-sig

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )