Flutter Engine
The Flutter Engine
|
Public Member Functions | |
def | __init__ (self, root, subpaths, conditions={}) |
def | TryLoad (self, name, more_conditions={}) |
def | Load (self, name, more_conditions={}) |
Loads template files from a path.
Definition at line 20 of file templateloader.py.
def scripts.templateloader.TemplateLoader.__init__ | ( | self, | |
root, | |||
subpaths, | |||
conditions = {} |
|||
) |
Initializes loader. Args: root - a string, the directory under which the templates are stored. subpaths - a list of strings, subpaths of root in search order. conditions - a dictionary from strings to booleans. Any conditional expression must be a key in the map.
Definition at line 23 of file templateloader.py.
def scripts.templateloader.TemplateLoader.Load | ( | self, | |
name, | |||
more_conditions = {} |
|||
) |
Returns contents of template file as a string, or raises an exception.
Definition at line 54 of file templateloader.py.
def scripts.templateloader.TemplateLoader.TryLoad | ( | self, | |
name, | |||
more_conditions = {} |
|||
) |
Returns content of template file as a string, or None of not found.
Definition at line 37 of file templateloader.py.