How to define a GLOBAL Variable ?

Aahz Maruch aahz at
Thu Aug 2 14:43:31 CEST 2001

In article <3b68d0d5 at>,
Peter Moscatt <pmoscatt at> wrote:
>If I wish to define a variable that I want to become global to ALL classes
>within a .py file - how is this best achieved ?

Depends whether you want write access to that variable or not.  If it's
read-only, just set the variable at the top of the module.
                      --- Aahz  <*>  (Copyright 2001 by aahz at

Hugs and backrubs -- I break Rule 6       
Androgynous poly kinky vanilla queer het Pythonista   

"activist for accuracy"  --SJM

More information about the Python-list mailing list