#!/usr/bin/python
doc = """
This script works with mod_python to browse a collection of annotated wav files
and results.
you will need to have at least the following packages need to be installed (the
name of the command line tool is precised in parenthesis):
libapache-mod-python (apache2 prefered)
sndfile-programs (sndfile-info)
vorbis-tools (oggenc)
python-gnuplot
python-numpy
Try the command line tools in aubio/python to test your installation.
NOTE: this script is probably horribly insecure.
example configuration for apache to put in your preferred virtual host.
""") WEBMASTER='piem@calabaza' SMTP_SERVER='localhost' def email(req,name,email,comment): import smtplib # make sure the user provided all the parameters if not (name and email and comment): return "A required parameter is missing, \ please go back and correct the error" # create the message text msg = """\ From: %s Subject: feedback To: %s I have the following comment: %s Thank You, %s """ % (email, WEBMASTER, comment, name) # send it out conn = smtplib.SMTP(SMTP_SERVER) try: conn.sendmail(email, [WEBMASTER], msg) except smtplib.SMTPSenderRefused: return """please provide a valid email""" conn.quit() # provide feedback to the user s = """\ Dear %s,