Can I "delete" the namespace of a module that i import?

Mike Driscoll kyosohma at gmail.com
Fri May 9 10:25:40 EDT 2008


On May 9, 9:06 am, "gbin,Zhou" <scutee... at gmail.com> wrote:
> Hi,all.
>    I see from "http://docs.python.org/tut/node11.html" that "Name
> spaces are created at different moments and have different lifetimes.
> The namespace containing the built-in names is created when the Python
> interpreter starts up, and is never deleted. The global namespace for
> a module is created when the module definition is read in; normally,
> module namespaces also last until the interpreter quits."
>    So can I "delete" the namespace of a module that i import?
>    thanks.

I did some searching and haven't found much. The closest I've found so
far is this old thread:

http://mail.python.org/pipermail/python-list/2000-February/022526.html

You might look at IDLE's code to see what it does when you tell it to
"restart" too.

Good luck!

Mike



More information about the Python-list mailing list