#!/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 """
Name
Value
"""
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 '
%s
%s
\n' % (cl[i%2],
name, cgi.escape(`environ[name]`))
i = i+1
yield '