Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python27
/
lib
/
python2.7
/
site-packages
/
mako
/
File Content:
lookup.pyo
� �ǚPc @ s� d d l Z d d l Z d d l Z d d l Z d d l m Z m Z d d l m Z y d d l Z Wn d d l Z n Xd e f d � � YZ d e f d � � YZ d S( i����N( t exceptionst util( t Templatet TemplateCollectionc B s5 e Z d Z d � Z d d � Z d � Z d � Z RS( s< Represent a collection of :class:`.Template` objects, identifiable via URI. A :class:`.TemplateCollection` is linked to the usage of all template tags that address other templates, such as ``<%include>``, ``<%namespace>``, and ``<%inherit>``. The ``file`` attribute of each of those tags refers to a string URI that is passed to that :class:`.Template` object's :class:`.TemplateCollection` for resolution. :class:`.TemplateCollection` is an abstract class, with the usual default implementation being :class:`.TemplateLookup`. c C s1 y | j | � t SWn t j k r, t SXd S( s� Return ``True`` if this :class:`.TemplateLookup` is capable of returning a :class:`.Template` object for the given ``uri``. :param uri: String URI of the template to be resolved. N( t get_templatet TrueR t TemplateLookupExceptiont False( t selft uri( ( s<