But, by deleting their namespace entries haven't I effectively unloaded them? In other words, from the point of the interpreter, isn't the state at point A and point B the same?
--- point A: import os del __main__.__dict__['os'] --- point B I guess my question boils down to, is the state of the python interpreter kept anywhere other than the __main__ namespace? Obviously the answer is yes - there's the current working directory and any running threads. I think I'm willing to live with those (yeah, I know, those are the words of a man who is going to spend time chasing obscure side-effects...) But are there other things I'm missing? Is my whole plan misguided from the beginning? -- http://mail.python.org/mailman/listinfo/python-list