[Python-Dev] Unload a module written in C

Victor Stinner victor.stinner at haypocalc.com
Fri Mar 25 10:46:06 CET 2011


Le vendredi 25 mars 2011 à 10:24 +0100, Stefan Behnel a écrit :
> "Martin v. Löwis", 25.03.2011 07:59:
> >> Is there a bug somewhere, or do I misunderstood something important?
> >
> > Module unloading is simply not implemented, and would be very difficult
> > to implement.
> 
> Are you saying that because objects instantiated from a module do not 
> normally keep a reference to it to keep it alive?

If you are right, I can understand that it is not possible to unload
safely a module.  In my case, faulthandler module doesn't create an
object, and it has a function to unload itself safely.

Victor



More information about the Python-Dev mailing list