Basic python help



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@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.


Relevant Pages

  • HttpWeb Request from Class Library fails to 500
    ... Hi I have a class library that needs to download the HTML in a specific page ... of ours with provided querystring. ... Server Error. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Internal Server Error
    ... Internal Server Error ... More information about this error may be available in the server error log. ... Following is the code to the CGI script: ... HTML ...
    (perl.beginners)
  • Visual Studio .NET - Web Application Error 500
    ... HTTP/1.0 500 Server Error, and It says the application is not available. ... I tried to open an HTML page from wwwroot folder I got the following error: ... Any suggestions why IIS stoped working after installing MSN Messanger and how I can fix this problem. ...
    (microsoft.public.inetserver.iis)
  • Re: cant connect
    ... "Terry" wrote: ... | More information about this error may be available in the server error ... a 500 Internal Server Error error was encountered while ... | to use an ErrorDocument to handle the request. ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: ASP.NET web app works on some, not all, workstations
    ... Start from finding out what server error causes the 'Internal Server Error'. ... you can use an http analyzer tool to see the errors. ... The application does not work for all workstations at the client site. ...
    (microsoft.public.dotnet.framework.aspnet)