> has to be imported by others. Would a module global.py (defining glob
> and imported by whoever needs it) be more pythonic?
I'd say yes.
> (I didn't want to do
> that because I really want to resist the temptation of introducing
> glob1, glob2, glob3...)
I miss seeing what that has to do w
Ah, thanks everybody! I had thought that, although the name was set to
"__main__", the module that was stored in sys.modules was m1
nevertheless, not a copy.
Well, having to write "import m1" inside m1.py seems a bit peculiar -
it's probably nicer to keep the "__main__" module free from stuff th
> I'm implementing a plugin-based program, structured like the example
> below (where m1 in the main module, loading m2 as a plugin). I wanted
> to use a single global variable (m1.glob in the example) to store some
> config data that the plugins can access. However, the output shown
> belown see
Michael Brenner wrote:
> Hi,
>
> I'm implementing a plugin-based program, structured like the example
> below (where m1 in the main module, loading m2 as a plugin). I wanted
> to use a single global variable (m1.glob in the example) to store some
> config data that the plugins can access. How
Hi,
I'm implementing a plugin-based program, structured like the example
below (where m1 in the main module, loading m2 as a plugin). I wanted
to use a single global variable (m1.glob in the example) to store some
config data that the plugins can access. However, the output shown
belown seem
Hi,
I'm implementing a plugin-based program, structured like the example
below (where m1 in the main module, loading m2 as a plugin). I wanted
to use a single global variable (m1.glob in the example) to store some
config data that the plugins can access. However, the output shown
belown seems to