On 8/3/06, Simon Brunning <[EMAIL PROTECTED]> wrote: > If you want to remove the module from a namespace into which you > imported it, you can do that with del: > > import amodule > amodule.afunction() # Works fine > > del amodule > amodule.afunction() # Will die now
Note that this doesn't get rid of a module entirely. Python will still holds on to the module, and if you just import it again at this point, it won't be re-executed - you'll just get another reference to the original module. -- Cheers, Simon B, [EMAIL PROTECTED], http://www.brunningonline.net/simon/blog/ -- http://mail.python.org/mailman/listinfo/python-list