class documentation

class Template(SignalEmitter): (source)

View In Hierarchy

This class defines the main interface for templates It takes care of parsing a template file and allows evaluating the template with a given set of template parameters.
Unknown Field: signal
process (output, context): emitted by the "process" method
Method __init__ Constructor @param file: a File object for the template file
Method do_process Undocumented
Method parse_included_file Undocumented
Method process No summary
Class Variable __signals__ Undocumented
Class Variable template_functions Undocumented
Instance Variable filename Undocumented
Instance Variable parts Undocumented
Instance Variable resources_dir Undocumented
Instance Variable _resources_cache Undocumented

Inherited from SignalEmitter:

Method __new__ Undocumented
Method block_signals Returns a context manager for blocking one or more signals
Method connect Register a handler for a specific object.
Method connect_after Like connect() but handler will be called after default handler
Method disconnect Undocumented
Method emit Undocumented
Method emit_return_first Emits a signal and stops emission on the first handler that returns a not-None value.
Method emit_return_iter Returns an generator that calls one handler on each iteration and yields the return values. This allows aggregating return values.
Method _connect Undocumented
Method _setup_signal Undocumented
Method _teardown_signal Undocumented
def __init__(self, file): (source)
Constructor
Parameters
filea File object for the template file
def do_process(self, output, context): (source)

Undocumented

def parse_included_file(self, path): (source)

Undocumented

def process(self, output, context): (source)
Evaluate the template
Parameters
outputan object that has an append() method (e.g. a list) to receive the output text
contexta dict with a set of template parameters. This dict is copied to prevent changes to the original dict when processing the template
Unknown Field: emits
process
__signals__ = (source)

Undocumented

template_functions = (source)

Undocumented

filename = (source)

Undocumented

parts = (source)

Undocumented

resources_dir = (source)

Undocumented

_resources_cache: dict = (source)

Undocumented