line separators

This commit is contained in:
Konstantin Bulenkov
2011-04-14 13:24:35 +04:00
parent 8aff3285e4
commit aad608e2c2
+13 -12
View File
@@ -34,6 +34,7 @@ to a different URL or to a local directory containing the Library
Reference Manual pages.
"""
__author__ = "Ka-Ping Yee <ping@lfw.org>"
__date__ = "26 February 2001"
@@ -1963,17 +1964,17 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>'''
self.callback = callback
self.base.__init__(self, self.address, self.handler)
def serve_until_quit(self):
import sys
if sys.platform.startswith('java'):
from select import cpython_compatible_select as select
else:
from select import select
self.quit = False
while not self.quit:
rd, wr, ex = select([self.socket], [], [], 1)
if rd: self.handle_request()
def serve_until_quit(self):
import sys
if sys.platform.startswith('java'):
from select import cpython_compatible_select as select
else:
from select import select
self.quit = False
while not self.quit:
rd, wr, ex = select([self.socket], [], [], 1)
if rd: self.handle_request()
def server_activate(self):
self.base.server_activate(self)
if self.callback: self.callback(self)
@@ -1984,7 +1985,7 @@ pydoc</strong> by Ka-Ping Yee &lt;ping@lfw.org&gt;</font>'''
try:
try:
DocServer(port, callback).serve_until_quit()
except (KeyboardInterrupt, select.error):
except (KeyboardInterrupt, select.error):
pass
finally:
if completer: completer()