예제 #1
0
 def run(self):
     self.callback(
         _start_server(
             _url_handler,
             hostname='127.0.0.1',
             port=self.port,
         ))
예제 #2
0
 def run(self):
     if PY3:
         # Python 3
         self.callback(_start_server(pydoc._url_handler,
                                     hostname='127.0.0.1',
                                     port=self.port))
     else:
         # Python 2
         pydoc.serve(self.port, self.callback, self.completer)