def load_template(self, templatename, template_string=None):
        if template_string is not None:
            return self.template_class(template_string)

        if self.use_package_naming:
            divider = templatename.rfind('.')
            if divider >= 0:
                from pkg_resources import resource_filename
                package = templatename[:divider]
                basename = templatename[divider + 1:] + self.extension
                templatename = resource_filename(package, basename)

        return self.loader.load(templatename)
Manage packages on remote hosts.
dataset/ETHPy150Open timonwong/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/python3/genshi/template/plugin.py/AbstractTemplateEnginePlugin.load_template--crossover with--dataset/ETHPy150Open ceph/ceph-deploy/ceph_deploy/pkg.py/make