twisted.web.wsgi module documentationtwisted.web
          View Source
          
        
      An implementation of Python Web Server Gateway Interface v1.0.1.
| Class | WSGIResource | An IResourceimplementation which delegates responsibility for all resources 
hierarchically inferior to it to a WSGI application. | 
| Function | _wsgiString 0 | Convert stringto an ISO-8859-1 byte string, if it is not 
already. | 
| Function | _wsgiStringToBytes 0 | Return stringas is; a WSGI string is a byte string in 
Python 2. | 
| Function | _wsgiString | Convert stringto a WSGI "bytes-as-unicode" 
string. | 
| Function | _wsgiStringToBytes | Convert stringfrom a WSGI "bytes-as-unicode" 
string to an ISO-8859-1 byte string. | 
| Class | _ErrorStream | File-like object instances of which are used as the value for the 'wsgi.errors'key in theenvirondictionary 
passed to the application object. | 
| Class | _InputStream | File-like object instances of which are used as the value for the 'wsgi.input'key in theenvirondictionary passed
to the application object. | 
| Class | _WSGIResponse | Helper for WSGIResourcewhich drives the WSGI application using a threadpool and hooks it up to thehttp.Request. | 
Convert string to an ISO-8859-1 byte string, if it is not 
already.
| Returns | (type: str/bytes) | |
| Raises | UnicodeEncodeError | If stringcontains non-ISO-8859-1 chars. | 
Return string as is; a WSGI string is a byte string in 
Python 2.
| Returns | (type: str/bytes) | |
Convert string to a WSGI "bytes-as-unicode" 
string.
If it's a byte string, decode as ISO-8859-1. If it's a Unicode string, round-trip it to bytes and back using ISO-8859-1 as the encoding.
| Returns | (type: str) | |
| Raises | UnicodeEncodeError | If stringcontains non-ISO-8859-1 chars. | 
Convert string from a WSGI "bytes-as-unicode" 
string to an ISO-8859-1 byte string.
| Returns | (type: bytes) | |
| Raises | UnicodeEncodeError | If stringcontains non-ISO-8859-1 chars. |