> But, by deleting their namespace entries haven't I effectively unloaded > them? In other words, from the point of the interpreter, isn't the
No. You haven't I'm not entirely sure why - that's deep in the internals of python - but I know for sure that reload() is not working fully as expected in some cases. > 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? Sort of, as for your comparably little saving of effort you put the burden of unknown side-effects from your doings on your user. Certainly not the right thing to do for an IDE, people prefer to trust these :) -- Regards, Diez B. Roggisch -- http://mail.python.org/mailman/listinfo/python-list