namespace question

Elaine Jackson elainejackson7355 at
Fri Sep 3 06:52:29 CEST 2004

It's what I want in the sense that it returns the correct dictionary when
globals is invoked interactively. What I want is to have a function that can be
imported into the interpreter and that will return that same dictionary.

"Phil Frost" <indigo at> wrote in message
news:mailman.2771.1094136818.5135.python-list at
| I'm not sure I understand what you are asking, but maybe globals() is
| what you want?
| On Thu, Sep 02, 2004 at 01:52:46PM +0000, Elaine Jackson wrote:
| > I would like to be able to write a function f, which will live in a module
| > 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. Is there a way to do this and, if so, how?
| > Muchas gracias for any and all assistance.
| >
| > Peace

More information about the Python-list mailing list