[Zope-Checkins] CVS: Packages/ZConfig/doc - zconfig.tex:1.16
Fred L. Drake, Jr.
fred@zope.com
Thu, 7 Nov 2002 15:05:30 -0500
Update of /cvs-repository/Packages/ZConfig/doc
In directory cvs.zope.org:/tmp/cvs-serv13361/doc
Modified Files:
zconfig.tex
Log Message:
Add support for loading from file objects.
=== Packages/ZConfig/doc/zconfig.tex 1.15 => 1.16 ===
--- Packages/ZConfig/doc/zconfig.tex:1.15 Thu Nov 7 14:21:53 2002
+++ Packages/ZConfig/doc/zconfig.tex Thu Nov 7 15:05:24 2002
@@ -183,7 +183,7 @@
\declaremodule{}{ZConfig}
\modulesynopsis{Configuration package}
-The main \module{ZConfig} package exports a single function:
+The main \module{ZConfig} package exports two convenience functions:
\begin{funcdesc}{load}{url}
Load and return a configuration from a URL or pathname given by
@@ -191,6 +191,14 @@
pathname. Fragment identifiers are not supported.
\end{funcdesc}
+\begin{funcdesc}{loadfile}{file\optional{, url}}
+ Load and return a configuration from an opened file object.
+ If \var{url} is omitted, one will be computed based on the
+ \member{name} attribute of \var{file}, if it exists. If no URL can
+ be determined, all \keyword{include} statements in the configuration
+ must use absolute URLs.
+\end{funcdesc}
+
\section{\module{ZConfig.Context} --- Application context}
@@ -218,13 +226,22 @@
replacement of the class.
\end{classdesc}
-The context object offers one method that is intended to be called
-once:
+The context object offers two methods that are used to load a
+configuration. Exactly one of these methods should be called, and it
+should be called only once:
\begin{methoddesc}{load}{url}
Load and return a configuration object from a resource. The
resource is identified by a URL or path given as \var{url}.
Fragment identifiers are not supported.
+\end{methoddesc}
+
+\begin{methoddesc}{loadfile}{file\optional{, url}}
+ Load and return a configuration from an opened file object.
+ If \var{url} is omitted, one will be computed based on the
+ \member{name} attribute of \var{file}, if it exists. If no URL can
+ be determined, all \keyword{include} statements in the configuration
+ must use absolute URLs.
\end{methoddesc}
The following methods are defined to be individually overridable by