from commands import getoutput def record_comments(req): name = req.form.getfirst('name','') presentation = req.form.getfirst('presentation','') q1 = req.form.getfirst('q1','') q2 = req.form.getfirst('q2','') report = "Name: " + name report += "\nPresentation: " + presentation report += "\nDate: " + getoutput("date") report += "\nWhat did you like about this presentation? \n" + q1 report += "\nWhat questions were you left with after the presentation? \n" + q2 report += "\n\n" open("/home/seth/101comments", "a").write(report) return "Thank You!" def details(req): username = req.form.getfirst('submit','').split(" ")[0] query = 'select description from users where username = "%s"'%username db = msd.connect(host="localhost", user="seth", passwd="new alpaca twist freezer", db="sec") cur = db.cursor() cur.execute(query) return "We know you %s"%cur.fetchone()[0] def index(req): page = """\
""" return page