code: def do_serve(argdict):
      '''Serve the site on localhost, for testing/development.'''
      site = make_site_obj(argdict)
      os.chdir(site.dirs['www'])
  
      HandlerClass = SimpleHTTPRequestHandler
      ServerClass  = BaseHTTPServer.HTTPServer
      Protocol     = "HTTP/1.0"
      server_address = (argdict['ip'], argdict['port'])
      HandlerClass.protocol_version = Protocol
      httpd = ServerClass(server_address, HandlerClass)
  
      sa = httpd.socket.getsockname()
      print "Serving HTTP on", sa[0], "port", sa[1], "..."
      httpd.serve_forever(f do_serve(argdict):
      '''Serve the site on localhost, for testing/development.'''
      site = make_site_obj(argdict)
      os.chdir(site.dirs['www'])
  
      HandlerClass = SimpleHTTPRequestHandler
      ServerClass  = BaseHTTPServer.HTTPServer
      Protocol     = "HTTP/1.0"
      server_address = (argdict['ip'], argdict['port'])
      HandlerClass.protocol_version = Protocol
      httpd = ServerClass(server_address, HandlerClass)
  
      sa = httpd.socket.getsockname()
      print "Serving HTTP on", sa[0], "port", sa[1], "..."
      httpd.serve_forever()
docs: Serve the site on localhost, for testing/development.