Commit fd540695 authored by Ka-Ping Yee's avatar Ka-Ping Yee

Remove forking. Doesn't work in Windows.

parent 24e7a292
...@@ -1224,7 +1224,7 @@ def apropos(key): ...@@ -1224,7 +1224,7 @@ def apropos(key):
# --------------------------------------------------- web browser interface # --------------------------------------------------- web browser interface
def serve(port, callback=None, completer=None): def serve(port, callback=None, completer=None):
import BaseHTTPServer, SocketServer, mimetools, select import BaseHTTPServer, mimetools, select
# Patch up mimetools.Message so it doesn't break if rfc822 is reloaded. # Patch up mimetools.Message so it doesn't break if rfc822 is reloaded.
class Message(mimetools.Message): class Message(mimetools.Message):
...@@ -1282,7 +1282,7 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font></small></small>''' ...@@ -1282,7 +1282,7 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font></small></small>'''
def log_message(self, *args): pass def log_message(self, *args): pass
class DocServer(SocketServer.ForkingMixIn, BaseHTTPServer.HTTPServer): class DocServer(BaseHTTPServer.HTTPServer):
def __init__(self, port, callback): def __init__(self, port, callback):
host = (sys.platform == 'mac') and '127.0.0.1' or 'localhost' host = (sys.platform == 'mac') and '127.0.0.1' or 'localhost'
self.address = ('', port) self.address = ('', port)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment