Package tdi :: Package tools :: Module template
[frames] | no frames]

Module template

source code

Template Tools

Template Tools.


Copyright: Copyright 2013 - 2015 André Malo or his licensors, as applicable

License:

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Author: André Malo

Classes
  TemplateUndecided
Template could not be determined, because the decision is ambiguous
  TemplateListProxy
Proxy TemplateList instances for lazy creation
  TemplateList
Container for template names
  Layout
Create template lists based on a start configuration
  Loader
Find, load and select templates
Functions
tuple
distinct_overlays(tpl)
Extract distinct overlay names of a template
source code
tuple
discover(loader, names, use=None, ignore=None)
Find templates to use and order them topologically correct
source code
Variables
  __doc__ = __doc__.encode('ascii').decode('unicode_escape')
  __package__ = 'tdi.tools'
Function Details

distinct_overlays(tpl)

source code 

Extract distinct overlay names of a template

Overlay names available both as target and source within the template are discarded.

Parameters:
Returns: tuple
set(targets), set(sources)

discover(loader, names, use=None, ignore=None)

source code 
Find templates to use and order them topologically correct
Parameters:
  • loader (Loader) - Template loader
  • names (iterable) - Base names. These templates are always added first, in order and define the initial list of overlays to discover.
  • use (dict) - Extra target mapping (overlay name -> template name). This is used, before the global overlay mapping is asked. Pass ambiguous overlay decisions here, or disable certain overlays by passing None as name.
  • ignore (iterable) - List of template names to ignore completely.
Returns: tuple
list(template names), set(missing overlays), dict(undecidable overlays -> possible template names)
Raises:

Variables Details

__doc__

Value:
__doc__.encode('ascii').decode('unicode_escape')

__package__

Value:
'tdi.tools'