python cgi problem with textarea

placid Bulkan at
Sun Apr 22 09:09:22 EDT 2007

On Apr 22, 4:08 pm, Adrian Smith <adrian_p_sm... at> wrote:
> This may be more a cgi thing than a Python one, but I'm trying to get
> this page:
> consisting basically of this:
> <FORM ACTION="/cgi-bin/python3.cgi" METHOD="POST">
> <P><INPUT TYPE=SUBMIT VALUE="submit" NAME="submitbutton">
> </FORM>
> print out the contents of the textarea with this cgi script:
> #!/usr/bin/python
> import cgi
> print "Content-type: text/html\n"
> form = cgi.FieldStorage()
> print form["essay"].value
> ...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,
> it seems to work for a friend in the UK who's looked at it, but it
> doesn't work for me here in Japan.

i just tried it and its working. here it is

maybe the internal server error is because mod_python isn't installed
assuming your using Apache as your web server


More information about the Python-list mailing list