def render_to_response(renderer_name, value, request=None, package=None, response=None):
 try:
  registry = request.registry
 except AttributeError:
  registry = None
 if (package is None):
  package = caller_package()
 helper = RendererHelper(name=renderer_name, package=package, registry=registry)
 with hide_attrs(request, 'response'):
  if (response is not None):
   request.response = response
  result = helper.render_to_response(value, None, request=request)
 return result

def render_to_response ( renderer_name , value , request = None , package = None , response = None ) : try : registry = request . registry except AttributeError : registry = None if ( package is None ) : package = caller_package ( ) helper = RendererHelper ( name = renderer_name , package = package , registry = registry ) with hide_attrs ( request , 'response' ) : if ( response is not None ) : request . response = response result = helper . render_to_response ( value , None , request = request ) return result
returns a httpresponse whose content is filled with the result of calling lookup .