Documented retval.TotalLines and retval.Visited.
1 parent 116aba8 commit 58d0c18b54cc387a2dc584fce9b8badc007023f4
@tundra tundra authored on 19 Jan 2005
Showing 1 changed file
View
44
tconfpy.3
 
At first glance this seems only mildly useful, but it is
actually very handy. As described later in this document,
\fCtconfpy\fP has a rich set of conditional operators and string
sustitution facilities. You can use these features along
substitution facilities. You can use these features along
with literal block processing and variable substitution
within those blocks. This effectively lets you use
\fCtconfpy\fP as a preprocessor for
.B any
it is understood to also be outside the configuration file (even
though you may have passed an initial version of \fCNAMESPACE\fP to
the parser).
 
Note also that this option applies only to the variables predefined
Note, also, that this option applies only to the variables predefined
by
.B \fCtconfpy\fP
itself. Any variables
.B you
 
 
.SS \fCtconfpy\fP Return Values
 
When \fCtconfpy\fP is finished processing the configuration file, it returns an
object that contains the entire results of the parse. This includes
a symbol table, any relevant error or warning messages, debug information
(if you requested this via the API), and any "literal" lines encountred
in the configuration.
When \fCtconfpy\fP is finished processing the configuration file, it
returns an object (of type \fCSymbolTable\fP) that contains the entire
results of the parse. This includes a symbol table, any relevant
error or warning messages, debug information (if you requested this
via the API), and any "literal" lines encountred in the configuration.
 
.B NOTE:
Because the object is of type \fCSymbolTable\fP, it contains other data
structures used by the parser itself. These are purposely "cleaned out"
before the parser returns and should never be used by the calling application
for any reason. In other words, use only the data structures documented
below when the parser returns control to your calling program.
 
The return object is an instance of the class \fCtwander.SymbolTable\fP which has
been populated with the results of the parse. In the simplest
case, we can parse and extract results like this:
makes \fCtconfpy\fP useful as a preprocessor for any other language or text.
\fCretval.LiteralLines\fP is a Python list containing all literal text
discovered during the parse. The lines appear there in the order
they were discovered in the configuration file.
 
.TP
.b retval.TotalLines
 
Contains a count of the number of the total number of lines processed during
the parse.
 
.TP
.b retval.Visited
 
Contains a list of all the configuration files and/or in-memory configurations
processed.
 
 
.SH CONFIGURATION LANGUAGE REFERENCE
 
.fi
.ft \" revert
 
.SH DOCUMENT REVISION INFORMATION
$Id: tconfpy.3,v 1.154 2005/01/19 22:30:55 tundra Exp $
$Id: tconfpy.3,v 1.155 2005/01/20 00:05:12 tundra Exp $