terom@6: #!/usr/bin/python2.5 terom@6: terom@7: """ terom@66: Sample CGI main() function. terom@66: terom@66: This example runs site.SiteModuleCollection('sites') terom@7: """ terom@6: terom@66: def main () : terom@16: """ terom@66: Build our wsgi.Application and run terom@7: """ terom@11: terom@11: try : terom@66: from qmsk.web import wsgi, cgi_main, site terom@31: terom@31: # create app terom@31: app = wsgi.Application(site.SiteModuleCollection('sites')) terom@16: terom@16: # run once terom@66: cgi_main.run(app) terom@11: terom@11: except : terom@66: # display error on stdout terom@66: cgi_main.error() terom@7: terom@7: if __name__ == '__main__' : terom@66: main() terom@66: