#!/usr/bin/python2.3 from fcgi import WSGIServer import os, sys def test_app(environ, start_response): """Probably not the most efficient example.""" import cgi start_response('200 OK', [('Content-Type', 'text/html')]) yield """ """ names = environ.keys() names.sort() cl = ('normal','alt') i = 0 for name in names: if not name.find("HTTP") or not name.find("REQUEST") or not name.find("wsgi."): yield '\n' % (cl[i%2], name, cgi.escape(`environ[name]`)) i = i+1 yield '
NameValue
%s%s
\n' \ '\n' WSGIServer(test_app).run()