2 from __future__ import print_function
4 import SimpleHTTPServer
9 path = os.path.dirname(sys.argv[0])
12 os.chdir('build-doc/output/html')
14 class ReusingTCPServer(SimpleHTTPServer.SimpleHTTPRequestHandler):
15 allow_reuse_address = True
18 # horrible kludge because SimpleHTTPServer is buggy wrt
19 # slash-redirecting of requests with query arguments, and will
20 # redirect to /foo?q=bar/ -- wrong slash placement
21 self.path = self.path.split('?', 1)[0]
22 return SimpleHTTPServer.SimpleHTTPRequestHandler.send_head(self)
24 httpd = SocketServer.TCPServer(
29 print("Serving doc at port: http://localhost:8080")
31 except KeyboardInterrupt: