Home | Trees | Indices | Help |
|
---|
|
object --+ | Directive --+ | WithDirective
Implementation of the py:with template directive, which allows shorthand access to variables and expressions.
>>> from genshi.template import MarkupTemplate >>> tmpl = MarkupTemplate('''<div xmlns:py="http://genshi.edgewall.org/"> ... <span py:with="y=7; z=x+10">$x $y $z</span> ... </div>''') >>> print tmpl.generate(x=42) <div> <span>42 7 52</span> </div>
Nested Classes | |
Inherited from |
Instance Methods | |||
|
|||
|
|||
|
|||
Inherited from |
Class Methods | |
Inherited from |
Class Variables | |
ATTRIBUTE =
|
|
tagname =
|
Properties | |
vars | |
Inherited from Inherited from |
Method Details |
|
|
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Mon Apr 16 16:02:14 2007 | http://epydoc.sourceforge.net |