#!/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,
)
# run... threads :(
server.run()