[Zope3-checkins] SVN: Zope3/trunk/src/zope/configuration/ Improved documentation by adding some and converting it to ReST.

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Jul 18 17:48:51 EDT 2004


Log message for revision 26612:
  Improved documentation by adding some and converting it to ReST.
  


Changed:
  U   Zope3/trunk/src/zope/configuration/config.py
  U   Zope3/trunk/src/zope/configuration/fields.py
  U   Zope3/trunk/src/zope/configuration/xmlconfig.py
  U   Zope3/trunk/src/zope/configuration/zopeconfigure.py


-=-
Modified: Zope3/trunk/src/zope/configuration/config.py
===================================================================
--- Zope3/trunk/src/zope/configuration/config.py	2004-07-18 14:54:12 UTC (rev 26611)
+++ Zope3/trunk/src/zope/configuration/config.py	2004-07-18 21:48:51 UTC (rev 26612)
@@ -17,7 +17,7 @@
 
 $Id$
 """
-
+__docformat__ = 'restructuredtext'
 import os.path
 import sys
 import sets

Modified: Zope3/trunk/src/zope/configuration/fields.py
===================================================================
--- Zope3/trunk/src/zope/configuration/fields.py	2004-07-18 14:54:12 UTC (rev 26611)
+++ Zope3/trunk/src/zope/configuration/fields.py	2004-07-18 21:48:51 UTC (rev 26612)
@@ -15,6 +15,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 import os, re, warnings
 from zope import schema
 from zope.schema.interfaces import IFromUnicode
@@ -79,6 +80,7 @@
     Examples:
 
     First, we need to set up a stub name resolver:
+
     >>> d = {'x': 1, 'y': 42, 'z': 'zope'}
     >>> class fakeresolver(dict):
     ...     def resolve(self, n):

Modified: Zope3/trunk/src/zope/configuration/xmlconfig.py
===================================================================
--- Zope3/trunk/src/zope/configuration/xmlconfig.py	2004-07-18 14:54:12 UTC (rev 26611)
+++ Zope3/trunk/src/zope/configuration/xmlconfig.py	2004-07-18 21:48:51 UTC (rev 26612)
@@ -19,6 +19,7 @@
 
 $Id$
 """
+__docformat__ = 'restructuredtext'
 import errno
 import os
 import sys
@@ -288,7 +289,13 @@
     return fp
 
 class IInclude(Interface):
+    """The ``zope:include`` directive
 
+    This directive allows you to include another ZCML file in the
+    configuration. This enables you to write configuration files in each
+    package and then link them together.
+    """
+
     file = schema.BytesLine(
         title=u"Configuration file name",
         description=u"The name of a configuration file to be included, "
@@ -305,14 +312,14 @@
         containing the including configuration file.  The pattern can
         include:
 
-        ``*`` matches 0 or more characters
+        - ``*`` matches 0 or more characters
+        
+        - ``?`` matches a single character
+        
+        - ``[<seq>]`` matches any character in seq 
+        
+        - ``[!<seq>]`` matches any character not in seq 
 
-        ``?`` matches a single character
-
-        [*seq*] matches any character in seq 
-
-        [!*seq*] matches any character not in seq 
-
         The file names are included in sorted order, where sorting is
         without regard to case.
         """,

Modified: Zope3/trunk/src/zope/configuration/zopeconfigure.py
===================================================================
--- Zope3/trunk/src/zope/configuration/zopeconfigure.py	2004-07-18 14:54:12 UTC (rev 26611)
+++ Zope3/trunk/src/zope/configuration/zopeconfigure.py	2004-07-18 21:48:51 UTC (rev 26612)
@@ -99,14 +99,25 @@
 
 $Id$
 """
-
+__docformat__ = 'restructuredtext'
 import os
 import zope.configuration.config as config
 from zope import schema
 from zope.interface import Interface
 
 class IZopeConfigure(Interface):
+    """The ``zope:configure`` Directive
 
+    The zope configuration directive is a pure grouping directive.  It
+    doesn't compute any actions on it's own. Instead, it allows a package to
+    be specified, affecting the interpretation of relative dotted names and
+    file paths. It also allows an i18n domain to be specified.  The
+    information collected is used by subdirectives.
+
+    It may seem that this directive can only be used once per file, but it can
+    be applied whereever it is convenient. 
+    """
+
     package = config.fields.GlobalObject(
         title=u"Package",
         description=u"The package to be used for evaluating relative imports "
@@ -123,7 +134,9 @@
                     u"used by a project.",
         required=False)
 
+
 class ZopeConfigure(config.GroupingContextDecorator):
+    __doc__ = __doc__
 
     def __init__(self, context, **kw):
         super(ZopeConfigure, self).__init__(context, **kw)
@@ -131,3 +144,4 @@
             # if we have a package, we want to also define basepath
             # so we don't acquire one
             self.basepath = os.path.split(self.package.__file__)[0]
+



More information about the Zope3-Checkins mailing list