File:action.py
#!c:/Python25/python
import cgi
import sys
def gen_html_header() :
print "Content-Type: text/html\n\n"
print ""
def gen_html_trailer() :
print ""
gen_html_header()
form = cgi.FieldStorage()
try :
file_contents = form["upfile"].value
print file_contents
except :
print sys.exc_info()
gen_html_trailer()