#!/Library/Frameworks/Python.framework/Versions/Current/bin/python
# L-33 MCS 275 Mon 7 Apr 2008 : 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
