changeset 70:451aeb35ec04

outline what options are available for ``value``
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 28 Mar 2012 11:18:13 -0700
parents 92c11cd1d27e
children c0ba4f455fcd
files README.txt
diffstat 1 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/README.txt	Wed Mar 28 11:05:29 2012 -0700
+++ b/README.txt	Wed Mar 28 11:18:13 2012 -0700
@@ -21,6 +21,23 @@
 ``name`` is the name of the configuration option, and ``value`` is a
 ``dict`` that gives the form of the option.
 
+``Configuration`` transforms these options into ``OptionParser`` options.
+
+Options for ``value`` include:
+
+ * help : what the option is about (translated to command line help)
+ * default: default value for the option
+ * required: if a true value, this option must be present in the
+   configuration. If ``required`` is a string, it will be displayed if
+   the option is not present. If the default is defined, you won't
+   need required as the default value will be used
+ * type: type of the option. Used to control the parsing of the option
+ * flags: a list that, if present, will be used for the command line
+   flags. Othwise, the option name prepended by ``--`` will be used.
+   To disable as a command line option, use an empty list ``[]``
+
+In addition, you may extend ``Configuration`` and have additional
+useful items in the ``value`` dict for ``options``.
 
 For an example, see
 http://k0s.org/mozilla/hg/configuration/file/c831eb58fb52/tests/example.py#l7