Is there a way to define a true global across modules?
Hendrik van Rooyen
mail at microcorp.co.za
Sat Nov 4 00:25:48 EST 2006
"robert" <no-spam at no-spam-no-spam.invalid> wrote:
> Fredrik Lundh wrote:
> > Hendrik van Rooyen wrote:
> >
> >> I am struggling with this - I want to define a "system-wide" flag for
> >> use as a
> >> semaphore.
> >
> >
http://www.effbot.org/pyfaq/how-do-i-share-global-variables-across-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
>
>
> -robert
Thanks - how could you possibly have guessed that I am lazy - does it show that
much? *WEG*
- Hendrik
More information about the Python-list
mailing list