module global variables

alex23 wuwei23 at gmail.com
Mon May 12 04:01:47 EDT 2008


On May 12, 5:17 pm, pistacchio <pistacc... at gmail.com> wrote:
> hi to all!
> can i load a module passing to it, automatically and as default, all
> the caller's global variables to act as module's global variables?
> thanks

module = __import__('module', globals=globals())

I think that's what you're looking for.

- alex23



More information about the Python-list mailing list