#!/usr/bin/env python """ A simple WSGI test application. Its main purpose is to show that WSGI support works (meaning that the web server and the WSGI adaptor / support module are configured correctly). As a nice plus, it outputs some interesting system / WSGI values as a nice HTML table. The main use of this script will be using the WSGI "application" defined below within your production WSGI environment. You will use some code similar to what you see at the end of this script to use the application from that environment. For the special case of apache2/mod_wsgi, it shoud be possible to directly use this file. If you start this script from the commandline either with python2.5 or with and older python + wsgiref module installed, it will serve the content on http://localhost:8000/ - this is mainly for debugging THIS script. @copyright: 2008 by MoinMoin:ThomasWaldmann @license: Python License, see LICENSE.Python for details. """ import os.path import os import sys try: __file__ except NameError: __file__ = '?' html_template = """\
1. System Information | |
---|---|
Python | %(python_version)s |
Python Path | %(python_path)s |
Platform | %(platform)s |
Absolute path of this script | %(abs_path)s |
Filename | %(filename)s |
2. WSGI Environment |