bin/pngtile.fcgi
author Tero Marttila <terom@fixme.fi>
Tue, 26 Jan 2010 20:49:05 +0200
changeset 117 2da34e3aa885
parent 42 a5bca7b0cd8a
child 124 a5e66a48b959
permissions -rwxr-xr-x
setup.py: fallback to .c if we don't have Cython
#!/usr/bin/env python2.5

import flup.server.fcgi

def main (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()

if __name__ == '__main__' :
    import pngtile.wsgi

    main(pngtile.wsgi.application)