"Robert D.M. Smith" wrote:
> I have a question on global variables and how to use them. I have 2 files;
> a.py & b.py
>
> # a.py -
>
> myvar = { 'test' : '123' }
>
> # ---
> # b.py -
>
> from a import myvar
>
> def test():
> a.myvar = { 'blah' : '456' }
>
> # -
>
> If
On Mon, Feb 2, 2009 at 10:25 PM, Robert D.M. Smith
wrote:
> I have a question on global variables and how to use them. I have 2 files;
> a.py & b.py
>
> # a.py -
>
> myvar = { 'test' : '123' }
>
> # ---
> # b.py -
>
> from a import myvar
>
> def test():
> a.myvar = { 'blah' : '45
I have a question on global variables and how to use them. I have 2 files;
a.py & b.py
# a.py -
myvar = { 'test' : '123' }
# ---
# b.py -
from a import myvar
def test():
a.myvar = { 'blah' : '456' }
# -
If I *'import a*' & type *'a.myvar'* it prints 'test' & '123'.
Now