Re: Accessing variables in __init__.py

2012-10-16 Thread Gaudha
On Tuesday, October 16, 2012 3:41:55 PM UTC+5:30, Marco Nawijn wrote: > On Tuesday, October 16, 2012 10:48:17 AM UTC+2, Gaudha wrote: > > > my_package/ > > > > > > __init__.py > > > > > > my_module1.py > > > > > > my_module2.py > > > > > > variables.py > > > > > > > > > >

Re: Accessing variables in __init__.py

2012-10-16 Thread Marco Nawijn
On Tuesday, October 16, 2012 10:48:17 AM UTC+2, Gaudha wrote: > my_package/ > > __init__.py > > my_module1.py > > my_module2.py > > variables.py > > > > I want to define common variables in __init__.py and use the namespace in > my_module1.py or my_module2.py. Defining it is not a p

Accessing variables in __init__.py

2012-10-16 Thread Gaudha
my_package/ __init__.py my_module1.py my_module2.py variables.py I want to define common variables in __init__.py and use the namespace in my_module1.py or my_module2.py. Defining it is not a problem. How can call it from my modules? If I define them in a module (say, variables.py), I c