Hendrik van Rooyen wrote:
> "robert" <no-> wrote:
> > Fredrik Lundh wrote:
> > > http://www.effbot.org/pyfaq/how-do-i...ss-modules.htm
> > Or worse style - if you are too lazy to create a extra global variables module
> > (ab)use the __main__ module als "global":
> > import __main__
> > __main__.mysemphore += 1
> Thanks - how could you possibly have guessed that I am lazy - does it show that
> much? *WEG*
You could merge the two approaches and bind a more explicit name to
__main__:
import __main__ as config
config.mysemaphore = 0
It's a little clearer what you're subverting __main__ for here
- alex23