__init__.py
Fredrik Lundh
fredrik at pythonware.com
Tue Nov 14 07:27:48 EST 2006
"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 by
> foo.mypath1 in first and second submodule class definitions?
looks ok to me, as long as you remember to actually import foo into your
submodules.
have you tried it?
</F>
More information about the Python-list
mailing list