Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def render_string(confname, format=None, **kw):
    template = confname + ".template"
    from pkg_resources import resource_string
    templatestring = resource_string("devpi_server.cfg", template)
    if not py.builtin._istext(templatestring):
        templatestring = py.builtin._totext(templatestring, "utf-8")

    kw = dict((x[0], str(x[1])) for x in kw.items())
    if format is None:
        result = templatestring.format(**kw)
    else:
        result = templatestring % kw
    return result
        


src/d/e/devpi-server-1.2.2/devpi_server/views.py   devpi-server(Download)
 
from .auth import Auth
from .config import render_string
 
server_version = devpi_server.__version__
def trigger_jenkins(stage, jenkinurl, testspec):
    baseurl = get_outside_url(request.headers,
                              stage.xom.config.args.outside_url)
 
    source = render_string("devpibootstrap.py",