9 Apr
2003
9 Apr
'03
6:57 p.m.
Jan Ma-Bška wrote at 2003-4-9 10:40 +0200:-A
This is quite a gotcha! :-) Try:
import mymodule #NOW IT'S LOADED del ( mymodule ) #HERE IT SHOULD UNLOAD
This is *very* unlikely. First of all, there is a reference in "sys.modules". Then, when "mymodules" defines functions or methods, they reference "mymodule" and prevent unloading. You can try: mymodule.__dict__.clear() # this clears the module import sys; del sys.modules['mymodule'] del mymodule When there are no longer any instances of classes defined in "mymodule", it may unload... Dieter