output.append(pformat(environ))
output.append('</pre>')
output.append('<form method="post">')
output.append('<input type="text" name="test">')
output.append('<input type="submit">')
output.append('</form>')
if environ['REQUEST_METHOD'] == 'POST':
    output.append('<h1>FORM DATA</h1>')
output.append(pformat(environ['wsgi.input'].read()))
output_len = sum(len(line) for line in output)
start_response('200 OK', [('Content-type', 'text/html'), ('Content-Length',
    str(output_len))])
return output
Python POST data using mod_wsgi