3.7. sciexp2.expdef.templates
Source: sciexp2/expdef/templates.py
Common functionality for launcher templates.
Two files can be provided for each template:
template-name.tpl
The template itself.
This is the file that will be produced (through translation).
template-name.dsc
The template descriptor.
Contains a predefined set of attributes (see
Template).The use of the
parentattribute is encouraged to write template refinements, so that instead of writing new.dscand.tplfiles you can simply write a single.dscand declare itsparent. Then, any attribute in the.dscfile (other than the set of predefined attributes) will be used to refine the variables of the parent template.
The templates are searched for in the paths listed in SEARCH_PATH,
where you can add new directories if necessary.
- SEARCH_PATH = ['.', '/home/docs/checkouts/readthedocs.org/user_builds/sciexp2-expdef/checkouts/stable/sciexp2/expdef/templates']
Paths to search for available templates.
The order of the list establishes which template will be used in case it exists in more than one directory.
Includes the current directory and the templates directory shipped with SciExp².
Functions
Get a Template object by name. |
|
Get a short description of all available templates. |
Classes
A launcher template. |
Exceptions
|
Error retrieving template file. |
3.7.2. get
- get(name)
Get a Template object by name.
3.7.3. get_description
- get_description()
Get a short description of all available templates.