From 0b08dacfcfced7fef1b4818a73c3f43a97fe8c8f Mon Sep 17 00:00:00 2001 From: Helmut Grohne Date: Sun, 15 Apr 2007 18:14:57 +0200 Subject: added docstrings --- wsgitools/scgi.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'wsgitools/scgi.py') diff --git a/wsgitools/scgi.py b/wsgitools/scgi.py index 477acf9..c12a296 100644 --- a/wsgitools/scgi.py +++ b/wsgitools/scgi.py @@ -168,7 +168,16 @@ class SCGIConnection(asyncore.dispatcher): __all__.append("SCGIServer") class SCGIServer(asyncore.dispatcher): + """SCGI Server for WSGI applications. It does not use multiple processes or + multiple threads.""" def __init__(self, wsgiapp, port, interface="localhost", error=sys.stderr): + """wsgiapp is the wsgi application to be run. + port is an int representing the TCP port number to be used. + interface is a string specifying the network interface to bind which + defaults to "localhost" making the server inaccessible over + network. + error is a file-like object being passed as wsgi.error in the environ + parameter defaulting to stderr.""" asyncore.dispatcher.__init__(self) self.wsgiapp = wsgiapp self.error = error @@ -185,5 +194,7 @@ class SCGIServer(asyncore.dispatcher): SCGIConnection(self, conn, addr) def run(self): + """Runs the server. It will not return and you can invoke + asyncore.loop() instead achieving the same effect.""" asyncore.loop() -- cgit v1.2.3