srikrishnamohan at gmail.com
Tue Nov 14 14:07:50 CET 2006
wow ! i tried it and it works like charm!
could access variables declared at root module dir in submodules.
also i would like to know if i can have an abstract class declared in
__init__.py with common variables ?
On 11/14/06, Fredrik Lundh <fredrik at pythonware.com> wrote:
> "km" wrote:
> > I have a structure like this :
> > foo/__init__.py
> > foo/bar/__init__.py
> > foo/bar/firstmodule.py
> > foo/abc/__init__.py
> > foo/abc/secondmodule.py
> > now i have some variables (paths to data files) common, to be used in
> > first module and second modules respectively.
> > can i set those variables in foo/__init__.py so that i can access them
> > foo.mypath1 in first and second submodule class definitions?
> looks ok to me, as long as you remember to actually import foo into your
> have you tried it?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list