bin/rrdweb.cgi
author Tero Marttila <terom@fixme.fi>
Tue, 02 Nov 2010 04:16:23 +0200
changeset 23 50f1b76b0835
permissions -rw-r--r--
Add sample rrdweb.cgi file
#!/usr/bin/env python2.5

"""
    Simple test server/environment for WSGI development
"""

from rrdweb import wsgi

from wsgiref.handlers import CGIHandler
import logging

if __name__ == '__main__' :
    logging.basicConfig(format="%(filename)s:%(lineno)d : %(message)s", level=logging.WARN)

    app = wsgi.WSGIApp(
            rrdpath     = 'rrd/',
            tplpath     = 'etc/templates',
            imgpath     = 'img/',
    )

    # run
    CGIHandler().run(app)