def test(HandlerClass=BaseHTTPRequestHandler, ServerClass=HTTPServer, protocol='HTTP/1.0', port=8000, bind=''):
 server_address = (bind, port)
 HandlerClass.protocol_version = protocol
 httpd = ServerClass(server_address, HandlerClass)
 sa = httpd.socket.getsockname()
 print ('Serving HTTP on', sa[0], 'port', sa[1], '...')
 try:
  httpd.serve_forever()
 except KeyboardInterrupt:
  print '\nKeyboard interrupt received, exiting.'
  httpd.server_close()
  sys.exit(0)

def test ( HandlerClass = BaseHTTPRequestHandler , ServerClass = HTTPServer , protocol = 'HTTP/1.0' , port = 8000 , bind = '' ) : server_address = ( bind , port ) HandlerClass . protocol_version = protocol httpd = ServerClass ( server_address , HandlerClass ) sa = httpd . socket . getsockname ( ) print ( 'Serving HTTP on' , sa [ 0 ] , 'port' , sa [ 1 ] , '...' ) try : httpd . serve_forever ( ) except KeyboardInterrupt : print '\nKeyboard interrupt received, exiting.' httpd . server_close ( ) sys . exit ( 0 )
rank-1 nex easily solves high-dimensional rosenbrock functions .