simple FastCGI support
authorTero Marttila <terom@fixme.fi>
Sat, 14 Feb 2009 19:23:25 +0200
changeset 126 2528cef45fe3
parent 125 45e56cbf9086
child 127 5746705a2719
simple FastCGI support
index.fcgi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/index.fcgi	Sat Feb 14 19:23:25 2009 +0200
@@ -0,0 +1,29 @@
+#!/usr/bin/python2.5
+# :set filetype=py
+
+"""
+    CGI mode using qmsk.web.fastcgi_main
+"""
+
+def main () :
+    """
+        Build our wsgi.Application and run
+    """
+
+    try :
+        from qmsk.web import wsgi, fastcgi_main
+        import urls
+
+        # create app
+        app = wsgi.Application(urls.mapper)
+
+        # run once
+        fastcgi_main.run(app)
+
+    except :
+        # display error on stdout
+        cgi_main.error()
+    
+if __name__ == '__main__' :
+    main()
+