Public Member Functions | List of all members
libuavcan_dsdl_compiler.pyratemp.Template Class Reference
Inheritance diagram for libuavcan_dsdl_compiler.pyratemp.Template:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, string=None, filename=None, parsetree=None, encoding='utf-8', data=None, escape=HTML, loader_class=LoaderFile, parser_class=Parser, renderer_class=Renderer, eval_class=EvalPseudoSandbox, escape_func=escape)
 
- Public Member Functions inherited from libuavcan_dsdl_compiler.pyratemp.TemplateBase
def __call__ (self, **override)
 
def __init__ (self, parsetree, renderfunc, data=None)
 
def __str__ (self)
 
def __unicode__ (self)
 

Additional Inherited Members

- Public Attributes inherited from libuavcan_dsdl_compiler.pyratemp.TemplateBase
 current_data
 
 data
 
 parsetree
 

Detailed Description

Template-User-Interface.

:Usage:
    ::
        t = Template(...)  (<- see __init__)
        output = t(...)    (<- see TemplateBase.__call__)

:Example:
    see module-docstring

Definition at line 1149 of file pyratemp.py.

Constructor & Destructor Documentation

◆ __init__()

def libuavcan_dsdl_compiler.pyratemp.Template.__init__ (   self,
  string = None,
  filename = None,
  parsetree = None,
  encoding = 'utf-8',
  data = None,
  escape = HTML,
  loader_class = LoaderFile,
  parser_class = Parser,
  renderer_class = Renderer,
  eval_class = EvalPseudoSandbox,
  escape_func = escape 
)
Load (+parse) a template.

:Parameters:
    - `string,filename,parsetree`: a template-string,
                           filename of a template to load,
                           or a template-parsetree.
                           (only one of these 3 is allowed)
    - `encoding`: encoding of the template-files (only used for "filename")
    - `data`:     data to fill into the template by default (dictionary).
          This data may later be overridden when rendering the template.
    - `escape`:   default-escaping for the template, may be overwritten by the template!
    - `loader_class`
    - `parser_class`
    - `renderer_class`
    - `eval_class`
    - `escapefunc`

Definition at line 1161 of file pyratemp.py.


The documentation for this class was generated from the following file:


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:04