--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/fastcgi_main.py Sat Feb 14 19:22:59 2009 +0200
@@ -0,0 +1,39 @@
+#!/usr/bin/python2.5
+
+"""
+ WSGI FastCGI support using flup (grr, threads).
+
+ Currently, this uses flup.server.fcgi, but it attempts to batten down the hatches against the evil that is
+ *threads* :)
+"""
+
+import flup.server.fcgi
+
+def run (app, bind=None) :
+ """
+ Run as a non-threaded single-process non-multiplexed FastCGI server
+ """
+
+ # create WSGIServer
+ server = flup.server.fcgi.WSGIServer(app,
+ # try to supress threading
+ multithreaded=False,
+ multiprocess=False,
+ multiplexed=False,
+
+ # specify the bind() address
+ bindAddress=bind,
+
+ # leave as defaults for now
+ umask=None,
+
+ # XXX: non-debug mode?
+ debug=True,
+ )
+
+ import sys
+ sys.stderr.write("qmsk.web.fastcgi: run\n")
+
+ # run... threads :(
+ server.run()
+