index.fcgi
author Tero Marttila <terom@fixme.fi>
Mon, 16 Feb 2009 00:54:25 +0200
changeset 132 0e857c4a67de
parent 126 2528cef45fe3
child 134 fbccc1648d79
permissions -rwxr-xr-x
cache version across calls to version_mercurial, so as to avoid opening the repo every time
#!/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()