
                                  1.0 License
                                  -----------

Copyright (c) 2004 by Daniel M. Gass

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

You may contact the author at <dmgass@hotmail.com>



                       2.0 config.py Module Description
                       -------------------------------- 

Python module for reading user configuration files to control script execution.  
(A more powerful alternative to Python's ConfigParser module).

This python module provides a provides a simple, but extremely flexible and 
powerful method of controlling python script execution by use of configuration 
settings stored in user configuration files.  This module is a more powerful 
alternative to the ConfigParser module already available in the standard Python 
distribution.

The standard ConfigParser module parses text based user configuration files and
provides access to that information.  This module reads python based
configuration files and provides access to the python objects contained within. 
In addition, this module supports hierarchical organization of the settings
within the configuration files so that settings may be accessed using keys
specified by the user from the command line or by other means.  By use of python
based configuration files, this module provides a simple solution to most
configuration problems but also has the flexibility to solve the most complex
configuration issues.

The goal of the Sourceforge project in which this module is a part of is to 
further refine the module and gather support for eventual inclusion into the 
standard Python distribution.



                             3.0 Installation and Use
                             ------------------------

Simply copy this module to anywhere in Python's module search path.  Documentation
as to the use of this module can be found in the module documentation string
found at the top of config.py.


                               4.0 Revision History
                               --------------------

Revision 1.2 (May 13, 2004)
---------------------------

Bug fix.  New attribute access method for settings was not returning value properly.


Revision 1.1 (May 13, 2004)
---------------------------

1) License changed from GPL to MIT

  My goal is to refine this module and include it in the python core.  
  Use of the MIT license allows this to occur, as well as allow any closed
  source developers to utilize this module.

2) Settings now available as attributes of a configuration instance

  cfg = config.Config()
  flag = cfg.flag.get('key1')

  versus the traditional method (still supported):

  flag = cfg.get('flag','key1')

3) Specification of keys or configuration files can either be a string or 
   anything iterable:

   <myConfig.py>
     KEYS = 'key1,key2' --or-- ['key1','key2']
     CONFIG_FILES = 'file1.py,file2.py' --or-- ['file1.py','file2.py']
   </myConfig.py>

   <yourScript>
     cfg = Config('file1.py,file2.py') --or-- Config(['file1.py','file2.py'])
     flag = cfg.flag.get('key1,key2')  --or-- cfg.flag.get(['key1','key2'])
   </yourScript>

4) An optional additional argument was added to the get method to pass a 
   function to check the values of the settings.

5) Use of keys from the environment must be enabled in the configuration file.

   In version 1.0 the "KEYS" environment variable was automatically read unless
   otherwise specified with "KEYS_VARIABLE".  This has been changed to only use
   keys from the environment when an environment variable is defined in the 
   configuration file using the "KEYS_VARIABLE" assignment:

   <myConfig.py>
     KEYS_VARIABLE = 'KEYS'
   </myConfig.py>

6) Keys specified in configuration files must use the "KEYS" assignment

   <myConfig.py>
     KEYS = 'key1,key2'
   </myConfig.py>

   In version 1.0, the "KEYS_VARIABLE" also controlled the keys assignment name.

7) An exception class was created and used for most exceptions raised.

8) Public interace to configuration instance keys and files was added.

9) Execution of module from command line will not crash when an included
   configuraton file is missing, instead a warning will be generated.

10) Documentation was updated to reflect the above changes.  Some discussion of
    settings possiblities was added to "quick start" section to beef up the 
    examples showing more typical uses.  A section was added discussing a bit of
    the history as to why this module was developed and may provide some insight
    into possible advanced uses of the flexibility of this module.


Revision 1.0 (April 30, 2004)
-----------------------------
Initial Release


