1*373Sdefan@nginx.comimport os
2*373Sdefan@nginx.comimport datetime
3*373Sdefan@nginx.comimport sys
4*373Sdefan@nginx.com
5*373Sdefan@nginx.comdef application(environ, start_response):
6*373Sdefan@nginx.com    output = datetime.datetime.now().strftime("%Y-%m-%d %I:%M:%S %p")
7*373Sdefan@nginx.com    output += "\n\nPython: "
8*373Sdefan@nginx.com    output += sys.version
9*373Sdefan@nginx.com    output += "\n\nENV Variables:\n\n"
10*373Sdefan@nginx.com    for param in os.environ.keys():
11*373Sdefan@nginx.com         output += param
12*373Sdefan@nginx.com         output += "\t"
13*373Sdefan@nginx.com         output += os.environ[param]
14*373Sdefan@nginx.com         output += "\n"
15*373Sdefan@nginx.com    start_response('200 OK', [('Content-type', 'text/plain')])
16*373Sdefan@nginx.com    return [s.encode('utf8') for s in output]
17