def GenerateYamlHandlersList(app_engine_web_xml, web_xml, static_files):
 welcome_properties = _MakeWelcomeProperties(web_xml, static_files)
 static_handler_generator = StaticHandlerGenerator(app_engine_web_xml, web_xml, welcome_properties)
 dynamic_handler_generator = DynamicHandlerGenerator(app_engine_web_xml, web_xml)
 handler_length = len(dynamic_handler_generator.GenerateOrderedHandlerList())
 if static_files:
  handler_length += len(static_handler_generator.GenerateOrderedHandlerList())
 if (handler_length > appinfo.MAX_URL_MAPS):
  dynamic_handler_generator.fall_through = True
  dynamic_handler_generator.welcome_properties = {}
 yaml_statements = ['handlers:']
 if static_files:
  yaml_statements += static_handler_generator.GetHandlerYaml()
 yaml_statements += dynamic_handler_generator.GetHandlerYaml()
 return yaml_statements

def GenerateYamlHandlersList ( app_engine_web_xml , web_xml , static_files ) : welcome_properties = _MakeWelcomeProperties ( web_xml , static_files ) static_handler_generator = StaticHandlerGenerator ( app_engine_web_xml , web_xml , welcome_properties ) dynamic_handler_generator = DynamicHandlerGenerator ( app_engine_web_xml , web_xml ) handler_length = len ( dynamic_handler_generator . GenerateOrderedHandlerList ( ) ) if static_files : handler_length += len ( static_handler_generator . GenerateOrderedHandlerList ( ) ) if ( handler_length > appinfo . MAX_URL_MAPS ) : dynamic_handler_generator . fall_through = True dynamic_handler_generator . welcome_properties = { } yaml_statements = [ 'handlers:' ] if static_files : yaml_statements += static_handler_generator . GetHandlerYaml ( ) yaml_statements += dynamic_handler_generator . GetHandlerYaml ( ) return yaml_statements
produces a list of yaml strings for dynamic and static handlers .