[Tutor] Unimporting modules

amk at amk.ca amk at amk.ca
Tue Oct 21 12:33:37 EDT 2003


On Tue, Oct 21, 2003 at 06:05:29PM +0200, Guillermo Fernandez wrote:
> I'm trying to unimport modules.

This isn't possible, in general.  A statement such as "del os" deletes the
binding for the name 'os' in the current namespace, but it doesn't remove
the module from sys.modules or free up the space used by its code.

--amk




More information about the Tutor mailing list