Руслан Урядинский / libuavcan

Dependents:   UAVCAN UAVCAN_Subscriber

Embed: (wiki syntax)

« Back to documentation index

Renderer Class Reference

Renderer Class Reference

Public Member Functions

def __init__
def render

Detailed Description

Render a template-parse-tree.

:Uses: `TemplateBase` for macros

Definition at line 1057 of file pyratemp.py.


Constructor & Destructor Documentation

def __init__ (   self,
  evalfunc,
  escapefunc 
)
Init the renderer.

:Parameters:
    - `evalfunc`: function for template-expression-evaluation
      (i.e. ``EvalPseudoSandbox().eval``)
    - `escapefunc`: function for escaping special characters
      (i.e. `escape`)

Definition at line 1063 of file pyratemp.py.


Member Function Documentation

def render (   self,
  parsetree,
  data 
)
Render a parse-tree of a template.

:Parameters:
    - `parsetree`: the parse-tree
    - `data`:      the data to fill into the template (dictionary)
:Returns:   the rendered output-unicode-string
:Exceptions:
    - `TemplateRenderError`

Definition at line 1084 of file pyratemp.py.