code: def cmd_serve(self, *args):
          '''Serve the bin directory via SimpleHTTPServer
          '''
          try:
              from http.server import SimpleHTTPRequestHandler
              from socketserver import TCPServer
          except ImportError:
              from SimpleHTTPServer import SimpleHTTPRequestHandler
              from SocketServer import TCPServer
  
          os.chdir(self.bin_dir)
          handler = SimpleHTTPRequestHandler
          httpd = TCPServer(("", SIMPLE_HTTP_SERVER_PORT), handler)
          print("Serving via HTTP at port {}".format(SIMPLE_HTTP_SERVER_PORT))
          print("Press Ctrl+c to quit serving.")
          httpd.serve_forever(f cmd_serve(self, *args):
          '''Serve the bin directory via SimpleHTTPServer
          '''
          try:
              from http.server import SimpleHTTPRequestHandler
              from socketserver import TCPServer
          except ImportError:
              from SimpleHTTPServer import SimpleHTTPRequestHandler
              from SocketServer import TCPServer
  
          os.chdir(self.bin_dir)
          handler = SimpleHTTPRequestHandler
          httpd = TCPServer(("", SIMPLE_HTTP_SERVER_PORT), handler)
          print("Serving via HTTP at port {}".format(SIMPLE_HTTP_SERVER_PORT))
          print("Press Ctrl+c to quit serving.")
          httpd.serve_forever()
docs: Serve the bin directory via SimpleHTTPServer