def start_webserver(ip, port, webroot, handler=WebHandler):
 web_server = _get_inst(ip, port)
 if ((web_server is None) or web_server.is_down()):
  web_server = HTTPServer((ip, port), webroot, handler)
  _servers[(ip, port)] = web_server
  server_thread = threading.Thread(target=web_server.serve_forever)
  server_thread.name = 'WebServer'
  server_thread.daemon = True
  server_thread.start()
 return web_server

def start_webserver ( ip , port , webroot , handler = WebHandler ) : web_server = _get_inst ( ip , port ) if ( ( web_server is None ) or web_server . is_down ( ) ) : web_server = HTTPServer ( ( ip , port ) , webroot , handler ) _servers [ ( ip , port ) ] = web_server server_thread = threading . Thread ( target = web_server . serve_forever ) server_thread . name = 'WebServer' server_thread . daemon = True server_thread . start ( ) return web_server
create a http server daemon .