/
/
usr/
lib64/
lib64/
/
python2.7/
Demo/
/#! /usr/bin/env python
"""CGI test 2 - basic use of cgi module."""
import cgitb; cgitb.enable()
import cgi
def main():
form = cgi.FieldStorage()
print "Content-type: text/html"
print
if not form:
print "
No Form Keys
"
else:
print "
Form Keys
"
for key in form.keys():
value = form[key].value
print "
", cgi.escape(key), ":", cgi.escape(value)
if __name__ == "__main__":
main()