Only add unique keywords and remove utils.py, which I'm not sure about
the copyright.
#!/usr/bin/python
import sys
import cgi
import my_db
from os import environ
from actions import actions
from config import CONFIG
def main():
sys.stderr = sys.stdout
print "Content-type: text/html; charset=iso-8859-1;"
print
form = cgi.FieldStorage()
debug = form.has_key('debug')
if debug:
sys.stderr = sys.stdout
print "<pre>"
db = my_db.connect(CONFIG, environ["REMOTE_USER"])
prefs = db.get_preferences()
if form.has_key('action'):
action = form['action'].value
else:
action = 'default'
if action in actions.keys():
actions[action](action, db, prefs, form)
else:
actions['default']('default', db, prefs, form)
if debug:
print "</pre>"