Re: global variable across modules

2013-09-11 Thread John Pote
Sorry about the html - did not realise. Thanks for your comments. John On 11 Sep 2013, at 22:49, John Pote wrote: > Chris, > Interesting. >> >> # Test1.py >> Debug_Value = " " >> >> # Test2.py >> from Test1 import * >> # is exactly equivalent to >> Debug_Value = " " >> > I take it then that

Re: global variable across modules

2013-09-11 Thread Dave Angel
On 11/9/2013 17:49, John Pote wrote: > Chris, > Interesting. >> >> # Test1.py >> Debug_Value = " " >> >> # Test2.py >> from Test1 import * >> # is exactly equivalent to >> Debug_Value = " " >> > I take it then that assigning to Debug_Value in Test2.py will not change the > value of Debug_Valu

Re: global variable across modules

2013-09-11 Thread John Pote
Chris, Interesting. > > # Test1.py > Debug_Value = " " > > # Test2.py > from Test1 import * > # is exactly equivalent to > Debug_Value = " " > I take it then that assigning to Debug_Value in Test2.py will not change the value of Debug_Value in Test1.py. That being the case it would be wrong t

Re: global variable across modules

2013-09-11 Thread Dave Angel
On 11/9/2013 08:50, chandan kumar wrote: > Hi , > > I'm trying to understand using global variable across different modules. Python doesn't have such a thing, unless you consider builtins. > Here is what i have tried so far without much success.Please ignore any > indentation issue  in the below

Re: global variable across modules

2013-09-11 Thread Chris Angelico
On Wed, Sep 11, 2013 at 10:50 PM, chandan kumar wrote: > In Test2.py file I wanted to print the global value ,Debug_Value as 10.I'm > not getting expected result.Please can any one point where exactly i'm doing > wrong. > > Similarly , how can i use global variable inside a class and use the sa

global variable across modules

2013-09-11 Thread chandan kumar
Hi , I'm trying to understand using global variable across different modules.Here is what i have tried so far without much success.Please ignore any indentation issue  in the below code. Filename:Test1.py Debug_Value = " " import Test2 def globalValmethod():     global Debug_Value     Debug