On Fri, Dec 07, 2001 at 10:55:20AM -0800, Chuck Esterbrook wrote:
> On Friday 07 December 2001 06:05 am, Geoffrey Talvola wrote:
> > As far as naming conventions, these are valid Python
> > modules/packages, so .py would probably be best. ?But it would be
> > nice to be able to identify config files from their filename, so it
> > could look like this for a multiple-file configuration:
> > Configs/
> > ? ? ? ? ?__init__.py
> > ? ? ? ? ?AppServerConfig.py
> > ? ? ? ? ?ApplicationConfig.py
> > ? ? ? ? ?...
> What's the __init__.py for? In other projects I just went with:
> and did an exec on FooBar to get the variables which looked like:
> reps = 50
> names = 'foo bar'.split()
from ?.Configs import AppServerConfig
for ext in AppServerConfig.ExtensionsToCascade: # Look ma, no 'exec'!
Without __init__.py, 'Configs' couldn't be imported as a package.
Although if you put the Configs directory directly in the path, you
wouldn't need __init__.py ...
-Mike (Iron) Orr, iron@... (if mail problems: mso@...)
http://iron.cx/ English * Esperanto * Russkiy * Deutsch * Espan~ol