def __init__(self, uri, name, log=False):
this_dir = os.path.dirname(__file__)
path = os.path.join(this_dir, "twisted-localserver.py")
ServerProcess.__init__(self, path, name)
self.uri = uri
authority = mechanize._rfc3986.urlsplit(uri)[1]
host, port = urllib.splitport(authority)
if port is None:
port = "80"
self.port = int(port)
# def report(msg):
# print "%s: %s" % (name, msg)
report = lambda msg: None
self.report_hook = report
self._log = log
self._start()
评论列表
文章目录