python cgi problem with textarea

Peter Otten __peter__ at web.de
Mon Apr 23 04:09:46 EDT 2007


Adrian Smith wrote:

> ...and I get an internal server error if I have any spaces in the
> textarea, which is really going to limit its usefulness to me. Oddly,

While debugging you should put

> #!/usr/bin/python
  
  import cgitb
  cgitb.enable()

> import cgi
> print "Content-type: text/html\n"
> form = cgi.FieldStorage()
> print form["essay"].value

at the beginning of your cgi -- just in case the error is in the python
script.

Peter




More information about the Python-list mailing list