Basic python help

Kevin Feng fengk at wharton.upenn.edu
Tue Mar 14 01:43:40 EST 2006


I have the following simple html file that is trying to send data to a
python script, however, I am getting a weird server error:

This is my HTML:

<html>
<FORM METHOD="POST" ACTION="../cgi-bin/quoteprice2.py">
Ticker 1
<input type="text" name="ticker1" size=10>
<br>

<input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</html>


This is my Python:

#!/usr/bin/python

import cgi
print "Content-type: text/html"
print

form = cgi.FieldStorage()
print form.keys()

print "<br>"

for x in form.keys():
    print "%s=%s" % (x, form[x].value) + "<br>"


This is my error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable
to complete your request.

Please contact the server administrator, root at localhost and inform them of
the time the error occurred, and anything you might have done that may have
caused the error.

More information about this error may be available in the server error log.



Any suggestions?  Much thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20060314/38602127/attachment.html>


More information about the Python-list mailing list