global variable

Harry George harry.g.george at boeing.com
Mon Jul 21 12:42:29 EDT 2003


Tom <llafba at gmx.net> writes:

> Hi,
> 
> I have one "master" program which calls a small program. In this small
> program I want to work with a value from the "master" program. But I
> always get this error: NameError: global name 'T' is not defined
> 
> How can I define a global variable?
> 
> Thanks for your help.
> Regards, Tom
> 


master.py:
my_global_var=1234

small.py:
import master
...
my_local_var=master.my_global_var * 3.14

-- 
harry.g.george at boeing.com
6-6M31 Knowledge Management
Phone: (425) 294-8757




More information about the Python-list mailing list