unloading imported modules

François Pinard pinard at iro.umontreal.ca
Sat Jul 20 16:26:37 EDT 2002


[Alex Martelli]

> xeon wrote:

> > Is it possible in python intepreter to unload imported modules? or are

> No.

Hello, Alex.

Suppose we reload, and reload and reload the same module, are the previous
copies freed from memory?  If not, then, sigh, I guess, this is it...
Otherwise, if I remove the module from sys.modules and from the module
namespace having imported it, what would keep it in memory?

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard





More information about the Python-list mailing list