def fill_template(template_text, context=None, **kwargs):
 if (template_text is None):
  raise TypeError('Template text specified as None to fill_template.')
 if (not context):
  context = kwargs
 return str(Template(source=template_text, searchList=[context]))

def fill_template ( template_text , context = None , ** kwargs ) : if ( template_text is None ) : raise TypeError ( 'Template text specified as None to fill_template.' ) if ( not context ) : context = kwargs return str ( Template ( source = template_text , searchList = [ context ] ) )
fill a cheetah template out for specified context .