index.cgi
author Tero Marttila <terom@fixme.fi>
Fri, 06 Feb 2009 21:31:02 +0200
changeset 7 d6a8258bd90e
parent 6 5565d94da522
child 11 fa216534ae45
permissions -rwxr-xr-x
YES YES MOAR WSGI - Hello World
#!/usr/bin/python2.5
# :set filetype=py encoding=utf8

"""
    CGI implementation
"""

# CGI handler for WSGI
import wsgiref.handlers

# our WSGI app
from lib import wsgi

def cgi_main () :
    """
        Run in CGI mode
    """
    
    # create handler
    cgi_handler = wsgiref.handlers.CGIHandler()
    
    # run once
    cgi_handler.run(wsgi.app)

if __name__ == '__main__' :
    cgi_main()