I have a few dozen simple Python CGI scripts.

Are there any advantages or disadvantages to rewriting these CGI
scripts as WSGI scripts?

Apologies if my terminology is not correct ... when I say WSGI
scripts I mean standalone scripts like the following simplified
(as an example) template:

import sys
def application(environ, start_response):
    output = 'Welcome to your mod_wsgi website! It
uses:\n\nPython %s' % sys.version
    response_headers = [
        ('Content-Length', str(len(output))),
        ('Content-Type', 'text/plain'),
    ]
    start_response('200 OK', response_headers)
    return [output]

When I say script I don't mean classic WSGI application in the
sense of a .serve_forever() loop coordinating a bunch of related
scripts - I mean individual, standalone scripts.

Hope this makes sense :)

Thank you,
Malcolm
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to