Variable passing between modules.

Golawala, Moiz M (GE Infrastructure) Moiz.Golawala at ge.com
Wed Sep 8 16:34:14 EDT 2004


Hi All, 

I want to pass a value between 2 modules. Both the modules are scripts (no classes involved). Does anyone know how I can do that. For eg:

in module1 


if __name__ == '__main__':
	someVar = 'hello'
	import module2


in module 2

# here I would like to use someVar
print someVar


Thanks,
Moiz Golawala
GE Infrastructure, Security
Software Engineer
Enterprise Solutions

T 561 994 5972
F 561 994 6572
E moiz.golawala at ge.com 
www.gesecurity.com

791 Park of Commerce Blvd., Suite 100
Boca Raton, FL, 33487, U.S.A.
GE Security, Inc.




More information about the Python-list mailing list