#!/Library/Frameworks/Python.framework/Versions/Current/bin/python # L-36 MCS 275 Mon 12 Apr 2010 : uploadfile.py # This CGI script takes the input of the form # uploadfile.html and writes the first line of # the file in plaintext on the web page. import cgi form = cgi.FieldStorage() print "Content-Type: text/plain\n" uploaded = form['upfile'] line = uploaded.file.readline() print line