Package wsgiref :: Module handlers :: Class BaseCGIHandler
[hide private]
[frames] | no frames]

_ClassType BaseCGIHandler

BaseHandler --+    
              |    
  SimpleHandler --+
                  |
                 BaseCGIHandler
Known Subclasses:

CGI-like systems using input/output/error streams and environ mapping

Usage:

   handler = BaseCGIHandler(inp,out,err,env)
   handler.run(app)

This handler class is useful for gateway protocols like ReadyExec and FastCGI, that have usable input/output/error streams and an environment mapping. It's also the base class for CGIHandler, which just uses sys.stdin, os.environ, and so on.

The constructor also takes keyword arguments 'multithread' and 'multiprocess' (defaulting to 'True' and 'False' respectively) to control the configuration sent to the application. It sets 'origin_server' to False (to enable CGI-like output), and assumes that 'wsgi.run_once' is False.

Nested Classes [hide private]

Inherited from BaseHandler: headers_class, wsgi_file_wrapper

Instance Methods [hide private]

Inherited from SimpleHandler: __init__, add_cgi_vars, get_stderr, get_stdin

Inherited from SimpleHandler (private): _flush, _write

Inherited from BaseHandler: cleanup_headers, client_is_modern, close, error_output, finish_content, finish_response, get_scheme, handle_error, log_exception, result_is_file, run, send_headers, send_preamble, sendfile, set_content_length, setup_environ, start_response, write

Class Variables [hide private]
  origin_server = False

Inherited from BaseHandler: bytes_sent, error_body, error_headers, error_status, headers, headers_sent, http_version, os_environ, result, server_software, status, traceback_limit, wsgi_multiprocess, wsgi_multithread, wsgi_run_once, wsgi_version