namespace question

Elaine Jackson elainejackson7355 at home.com
Fri Sep 3 00:52:29 EDT 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 bitglue.com> wrote in message
news:mailman.2771.1094136818.5135.python-list at python.org...
| 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
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. 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