FAQ
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?

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 5 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedMar 18, '05 at 6:42p
activeMar 19, '05 at 1:01p
posts5
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase