Table of Contents

Module: DT_Let Zope-2.2.1-src/lib/python/DocumentTemplate/DT_Let.py

The Let tag was contributed to Zope by and is copyright, 1999 Phillip J. Eby. Permission has been granted to release the Let tag under the Zope Public License.

Let name=value...

The let tag is used to bind variables to values within a block.

The text enclosed in the let tag is rendered using information from the given variables or expressions.

For example:

     <!--#let foofunc="foo()" my_bar=bar-->
       foo() = <!--#var foofunc-->,
       bar = <!--#var my_bar-->
     <!--#/let-->

Notice that both name and expr style attributes may be used to specify data. name style attributes (e.g. my_bar=bar) will be rendered as they are for var/with/in/etc. Quoted attributes will be treated as Python expressions.

Variables are processed in sequence, so later assignments can reference and/or overwrite the results of previous assignments, as desired.

Imported modules   
from DT_Util import render_blocks, Eval, expr_globals, ParseError, regex, strip
Functions   
parse_let_params
  parse_let_params 
parse_let_params (
        text,
        result=None,
        tag='let',
        parmre=regex.compile( '\([\0- ]*\([^\0- =\"]+\)=\([^\0- =\"]+\)\)' ),
        qparmre=regex.compile( '\([\0- ]*\([^\0- =\"]+\)="\([^"]*\)\"\)' ),
        **parms,
        )

Exceptions   
ParseError
Classes   
Let

Table of Contents

This document was automatically generated on Mon Sep 4 07:33:06 2000 by HappyDoc version r0_6