CGI Web Python Tutorial

#!/usr/bin/env python
import cgitb
cgitb.enable()
import cgi, os, urllib
print "Content-type: text/html"
print
print """"""
form = cgi.FieldStorage()
if form.getfirst('data') == None:
    print "No submitted data.

"
else:
    print "Submitted data:

"
    print '%s

' % \
            (os.environ['SCRIPT_NAME'],
             urllib.quote_plus(form.getfirst('data')),
             cgi.escape(form.getfirst('data')))
print """
Supply some data: 



""" % os.environ['SCRIPT_NAME']