You can remove one reference from the sys module:
Import sys
del sys.modules['mymodule']
In cpp it would be like:
import('sys').attr('modules')['mymodule'].del()
I can give you my code later. Don't have it here!
// Simon
On 1 aug 2011, at 13:38, Valentin Perrelle <[email protected]> wrote:
> Le 01/08/2011 13:19, Simon Warg a écrit :
>> In My program I need to unload modules as well. What I do is remove all
>> references to the particular module and it will be unloaded.
> It seems i didn't achieve to do that. There should be some references i can't
> remove, i don't know why yet.
>
>>
>> Are you using boost python for python 2 or 3? If it's the latter it is safe
>> to use Py_Finalize()! I use it myself!
> I'm using Python 3. But the problem of unregistered converters is still
> there. See
> http://mail.python.org/pipermail/cplusplus-sig/2009-August/014736.html
>
>
> _______________________________________________
> Cplusplus-sig mailing list
> [email protected]
> http://mail.python.org/mailman/listinfo/cplusplus-sig
_______________________________________________
Cplusplus-sig mailing list
[email protected]
http://mail.python.org/mailman/listinfo/cplusplus-sig