M doc/source/index.rst +1 -0
@@ 19,6 19,7 @@ Contents:
vanity_cli
vanity_commander
+ vanity_configreader
Indices and tables
==================
A => doc/source/vanity_configreader.rst +6 -0
@@ 0,0 1,6 @@
+
+:mod:`vanity.configreader` -- Simple Configration File Reading
+================================================================
+
+.. automodule:: vanity.configreader
+ :members:
M vanity/configreader.py +9 -6
@@ 9,17 9,20 @@
"""A very simple config file reader
Similar to the ConfigParser module in the python standard libary,
-only extemely simple, without any advanced interpolation or
-type conversions. The ConfigReader class implements absolutely
-no funny business with regard to value content.
+with a simplified interface. Simple, without any interpolation or
+automatic type conversions. The ConfigReader class implements absolutely
+no funny business with regard to the strings in the configuration file.
+The ConfigReader class is read only.
In addition to not treating the values with any magic, the
ConfigReader class retains the order of the items in every
section, in case the application needs configuration items
in the order specified by the user.
-If you want interpolation, build a layer on top of ConfigReader
-or use the standard library. :-)
+ConfigReader is designed to be very simple to subclass which
+should make adding interpolation, or other features easier
+than removing unwanted features from the standard library
+ConfigParser. At least, thats the general idea. :-)
"""
@@ 192,7 195,7 @@ class ConfigReader(object):
names. If that value does not exist in the configuration
return the value of default.
- NOTE: This operates the same as dict.get(...) and unlike
+ NOTE: This operates like dict.get(...) and unlike
ConfigParser.get(...). Since this class does not do any
interpolation, the only way to get a None value is if
the key does not exist.