CGI python use "under a curse"

Adrian Smith adrian_p_smith at yahoo.com
Mon May 7 02:10:23 EDT 2007


On May 7, 2:30 pm, Steven D'Aprano
<ste... at REMOVE.THIS.cybersource.com.au> wrote:
> On Sun, 06 May 2007 21:30:16 -0700, Adrian Smith wrote:

> It is NOT the same error. There are NO syntax errors in the script, there
> is a runtime error. The so-called administrator is wrong: you can't use
> Perl to test just any old CGI scripts. They have to be written in Perl.

Well, I thought that, but you know what happens to newbies who come
out with such opinions forcefully. Maybe they have special magic perl
which parses python.

> I see from the source code on your page that you have a line:
>
> <TEXTAREA NAME="essay" COLS=60 ROWS=20 WRAP=HARD></TEXTAREA>
>
> You have two lines in your cgi script:
>
> form = cgi.FieldStorage()
> print form["essay"].value
>
> Having never done cgi programming, I'm not sure what the problem is, but
> after reading help(cgi) I'll take a stab in the dark and say try this:
>
> print form.value
>
> It might also help for you to try this:
>
> print form.keys()

Both give me the same ISE, alas.

> Good luck with the "admins" at your hosting company.

Well, it *is* free, and there aren't that many free ones that offer
Python. My paid-for host has sent me a message to say they're
ruminating on my issues, though, so I live in hope.




More information about the Python-list mailing list