#!/home1/jonathh0/env/edu/bin/python

# set: ts=4 sts=4 sw=4 et ai tw=78 :
requests =0

def myapp(environ, start_response):
    global requests
    requests += 1
    start_response('200 OK', [('Content-Type', 'text/plain')])

    response =  [
        "Requests: %d\n\n" % requests,
    ]
    response.extend([
        "%s = %r\n" % (key, value)
        for (key, value) in environ.items()
    ])

    return response

if __name__ == '__main__':
    from flup.server.fcgi import WSGIServer
    WSGIServer(myapp).run()