a little more help with python server-side scripting

Magnus Lycka lycka at carmen.se
Thu Feb 23 04:59:08 EST 2006


Dennis Lee Bieber wrote:
> On Wed, 22 Feb 2006 20:43:38 GMT, John Salerno
> <johnjsal at NOSPAMgmail.com> declaimed the following in comp.lang.python:
> 
> 
>>Does that answer the question about active scripting language?
> 
> 
> 	Slipping in... It sure sounds to me like they have Python as a pure
> CGI language.
> 
> That is:
> 	You must reference the script with a URL having .../script.py (and
> arguments will possibly be sent appended to this, but should have been
> parsed out and become part of the standard CGI environment).

If you want existing links to continue to work, you can simply
place HTML redirects in the current HTML files, so that they
invoke the proper Python CGI script, i.e. somepage.html should
contain a redirect to /my_cgi.py?page=somepage

I've roughly described in a previous posting how my_cgi.py should
work. Just let it suck in the file with the 'somepage' content,
and add the header and footer stuff.

You'll find Python CGI tutorials on the net, and the library
reference chapters on cgi and cgitb will also help. Start by
enabling cgitb...




More information about the Python-list mailing list