Add sample rrdweb.cgi file
authorTero Marttila <terom@fixme.fi>
Tue, 02 Nov 2010 04:16:23 +0200
changeset 23 50f1b76b0835
parent 22 809686edcd4c
child 24 29a523db66a8
Add sample rrdweb.cgi file
bin/rrdweb.cgi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/rrdweb.cgi	Tue Nov 02 04:16:23 2010 +0200
@@ -0,0 +1,23 @@
+#!/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)
+