#!/usr/bin/env pythonimport cgitbcgitb.enable()import cgi, os, urllibprint "Content-type: text/html"printprint """<HTML><BODY>"""form = cgi.FieldStorage()if form.getfirst('data') == None: print "No submitted data.<P>"else: print "Submitted data:<P>" print '<A HREF="%s?data=%s"><TT>%s</TT></A><P>' % (os.environ['SCRIPT_NAME'], urllib.quote_plus(form.getfirst('data')), cgi.escape(form.getfirst('data')))print """<FORM METHOD="GET" ACTION="%s">Supply some data: <INPUT TYPE="text" NAME="data" WIDTH="40"><INPUT TYPE="submit" NAME="submit" VALUE="Submit"></FORM></BODY></HTML>""" % os.environ['SCRIPT_NAME']
Name (required)
email (will not be published) (required)
Website