namespace question

Elaine Jackson elainejackson7355 at home.com
Fri Sep 3 00:51:17 EDT 2004


By "the interpreter's global namespace" I mean the dictionary that gets returned
if you evaluate 'globals()' in the interpreter.

"Peter Hansen" <peter at engcorp.com> wrote in message
news:UaydnaeLxJDpqqrcRVn-vg at powergate.ca...
| Elaine Jackson wrote:
| > I would like to be able to write a function f, which will live in a module
M,
| > and will call a function g, such that, when f is imported from M into the
| > interpreter, and invoked there, its invokation of g will return the
| > interpreter's global namespace.
|
| What does that last part mean?  There is no such thing as the
| "interpreter's global namespace".  Each module is its own namespace.
|
| -Peter





More information about the Python-list mailing list