def CreateServer(root_path,
                 login_url,
                 port,
                 template_dir=None,
                 serve_address='',
                 allow_skipped_files=False,
                 static_caching=True,
                 python_path_list=sys.path,
                 sdk_dir=SDK_ROOT,
                 default_partition=None,
                 frontend_port=None,
                 interactive_console=True,
                 secret_hash="xxx"):





  absolute_root_path = os.path.realpath(root_path)

  FakeFile.SetAllowedPaths(absolute_root_path,
                           [sdk_dir])
  FakeFile.SetAllowSkippedFiles(allow_skipped_files)

  handler_class = CreateRequestHandler(absolute_root_path,
                                       login_url,
                                       static_caching,
                                       default_partition,
                                       interactive_console,
                                       secret_hash=secret_hash)

  if absolute_root_path not in python_path_list:


    python_path_list.insert(0, absolute_root_path)

  server = HTTPServerWithScheduler((serve_address, port), handler_class)



  queue_stub = apiproxy_stub_map.apiproxy.GetStub('taskqueue')
  if queue_stub and hasattr(queue_stub, 'StartBackgroundExecution'):
    queue_stub.StartBackgroundExecution()


  channel_stub = apiproxy_stub_map.apiproxy.GetStub('channel')
  if channel_stub:
    channel_stub._add_event = server.AddEvent
    channel_stub._update_event = server.UpdateEvent

  server.frontend_hostport = '%s:%d' % (serve_address or 'localhost',
                                        frontend_port or port)

  return server
Creates a new HTTPServer for an application.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/tools/dev_appserver.py/CreateServer