def get_template(self, uri):
        """Return a :class:`.Template` object corresponding to the given
        ``uri``.

        .. note:: The ``relativeto`` argument is not supported here at the moment.

        """

        try:
            if self.filesystem_checks:
                return self._check(uri, self._collection[uri])
            else:
                return self._collection[uri]
        except KeyError:
            u = re.sub(r'^\/+', '', uri)
            for dir in self.directories:
                srcfile = posixpath.normpath(posixpath.join(dir, u))
                if os.path.isfile(srcfile):
                    return self._load(srcfile, uri)
            else:
                raise exceptions.TopLevelLookupException(
                                    "Cant locate template for uri %r" % uri)
def get_template ( self , uri ) : try : if self . filesystem_checks : return self . _check ( uri , self . _collection [ uri ] ) else : return self . _collection [ uri ] except KeyError : u = re . sub ( r'^\/+' , '' , uri ) for dir in self . directories : srcfile = posixpath . normpath ( posixpath . join ( dir , u ) ) if os . path . isfile ( srcfile ) : return self . _load ( srcfile , uri ) else : raise exceptions . TopLevelLookupException ( "Cant locate template for uri %r" % uri )
Return a :class:`.Template` object corresponding to the given
        ``uri``.

        .. note:: The ``relativeto`` argument is not supported here at the moment.