At 05:30 PM 12/6/01 -0800, Tavis Rudd wrote:
>I've attached a copy of the old .webkit_config_annotated file
>translated to the proposed format.  It seems to work with all
>versions of Python, not just 2.1 and up.  This file contains all the
>settings and is more complicated than the average user will need so
>I've also attached an example of what typical config might look like.
>
>The SettingsContainer baseclass is used to make sure that settings
>that are in fact meant to be classes aren't handled as
>SettingsContainers. In practice a shorter name might be better.
>
>Finally, I've attached some simple functions that can be used to get
>settings out of the SettingsContainers recursively and turn them into
>dictionaries.

I like it.  I'd like it even better if there were some way to get rid of 
the SettingsContainer base class which seems to clutter it up a 
bit.  Couldn't we just ignore any classes that start with underscores, and 
treat all other classes as setting containers?  This would be consistent 
with Python's use of "from module import *" which ignores things that start 
with underscores.

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
         ...

or in a single-file format:

WebKitConfigs.py

In other words, things that contain multiple configurations end in 
"Configs.py" and things that contain single configurations end in "Config.py".

The WebKit launcher would accept either a "Configs" directory, or a 
single-file "XXXConfigs.py" on the command-line, and would do the right thing.


--

- Geoff Talvola
   [EMAIL PROTECTED]

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to