def RewriteResponse(response_file, response_rewriters=None, request_headers=None, env_dict=None):
 if (response_rewriters is None):
  response_rewriters = CreateResponseRewritersChain()
 response = AppServerResponse(response_file)
 for response_rewriter in response_rewriters:
  if (response_rewriter.func_code.co_argcount == 1):
   response_rewriter(response)
  elif (response_rewriter.func_code.co_argcount == 2):
   response_rewriter(response, request_headers)
  else:
   response_rewriter(response, request_headers, env_dict)
 return response

def RewriteResponse ( response_file , response_rewriters = None , request_headers = None , env_dict = None ) : if ( response_rewriters is None ) : response_rewriters = CreateResponseRewritersChain ( ) response = AppServerResponse ( response_file ) for response_rewriter in response_rewriters : if ( response_rewriter . func_code . co_argcount == 1 ) : response_rewriter ( response ) elif ( response_rewriter . func_code . co_argcount == 2 ) : response_rewriter ( response , request_headers ) else : response_rewriter ( response , request_headers , env_dict ) return response
allows final rewrite of dev_appserver response .