Unload Modules
Joal Heagney
s713221 at student.gu.edu.au
Thu Nov 9 23:11:23 EST 2000
Steve Juranich wrote:
> On Thu, 9 Nov 2000, Curtis Jensen wrote:
>
> > I can't seem to find a clear answer on this, but how do I remove an
> > imported module? I have some C modules that I import, the modules only
> > contain function calls. However, they are pretty big, and I'd like to
> > unload these modules after I am done with them, in order to save on
> > memory. I don't have the source for these modules.
> >
> > How can I unload these modules from within Python? Thanks.
> >
>
> AFAIU, all you need to do is 'del <module_name>'.
>
> HTH-ly y'rs,
>
> ----------------------------------------------------------------------
> Stephen W. Juranich sjuranic at ee.washington.edu
> Electrical Engineering http://students.washington.edu/sjuranic
> University of Washington http://rcs.ee.washington.edu/ssli
Which works if you didn't use:
from <module_name> import *
like in wxPython.wx/.ogl/.stc. Otherwise, you've got a problem.
Joal Heagney/AncientHart
More information about the Python-list
mailing list