def call_template(template,context=None,**kw):
    """ Calls a template and returns the generated content.
        this is pretty much braindead, it's just meant to give you
        the general idea.
    """

    # efficiency is not the problem here
    if context is not None:
        d = dict(context)
        d.update(kw)
    else:
        d = kw
    
    return template%d
 Calls a template and returns the generated content.
        this is pretty much braindead, it's just meant to give you
        the general idea.
    
recipes/Python/440685_Use_frame_inspectisimplify_template/recipe-440685.py