#!/usr/bin/python ################################################################# # generate html for main page dynamically from an executable # Python script, not a pre-coded HTML file; this lets us # import the expected input field name and the selection table # values from a common Python module file; changes in either # now only have to be made in one place, the Python module file. ################################################################# REPLY = """Content-type: text/html Languages2

Hello World selector

Similar to file languages.html, but this page is dynamically generated by a Python CGI script, using selection list and input field names imported from a common Python module on the server. Only the common module must be maintained as new languages are added, because it is shared with the reply script. To see the code that generates this page and the reply, click here, here, here, and here.


Select a programming language:

""" import string from languages2common import hellos, inputkey options = [] for lang in hellos.keys(): options.append('