The web.wsgi.cgi module provides one class CGI
which adds the key 'web.cgi'
to the environ dictionary. Middleware or applications further down the chain can access CGI variables usually accessed through the web.cgi
object by using environ['web.cgi']
. The class takes no arguments.
application) |
Entries added to environ:
environ['web.cgi']
web.cgi
For example:
import web.wsgi.cgi def myApp(environ, start_response): start_response('200 OK', [('Content-type','text/plain')]) return ['Here are the CGI variables: %s'%('\n'.join(environ['web.cgi'].keys()))] application = web.wsgi.cgi.CGI(myApp)