Re: import and shared global variables

2006-03-10 Thread Michael Brenner
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

import and shared global variables

2006-03-10 Thread Michael Brenner
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

import and shared global variables

2006-03-10 Thread Michael Brenner
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