Re: CGI python use "under a curse"



Adrian Smith wrote:
On May 7, 2:30 pm, Steven D'Aprano
<ste...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> 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.

I'd go to Cornerhost. You can get a cheap account there and the support is friendly and knowledgable. I am no longer a customer and do not stand to gain by this recommendation, but they are a small business that were very helpful to me when I *was* a customer.

regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://del.icio.us/steve.holden
------------------ Asciimercial ---------------------
Get on the web: Blog, lens and tag your way to fame!!
holdenweb.blogspot.com squidoo.com/pythonology
tagged items: del.icio.us/steve.holden/python
All these services currently offer free registration!
-------------- Thank You for Reading ----------------

.



Relevant Pages

  • Re: CGI python use "under a curse"
    ... KeyError: 'essay' ... perl -p python1.cgi ... PLease fix syntax error so it will work fine. ... Perl to test just any old CGI scripts. ...
    (comp.lang.python)
  • Re: Need help with CGI/ DBI error (permissions?)
    ... >> My other Perl CGI scripts that don't use DBI run OK, ... > able to telepathically decipher your web server configuration, ... problems with serving up *Perl* pages. ... you just said that your other CGI scripts run fine. ...
    (comp.lang.perl.misc)
  • Re: cgi invoked .bat script cant access network drives!
    ... [snip stuff about user IDs and permssions wrt CGI scripts run from ... IIS] ... Such questions should not be posted to newsgroups that deal with the ... Perl programming language as they will be unwellcome there. ...
    (comp.lang.perl)
  • RE: Perl Programming within Debian
    ... For command-line scripts, I don't use any extension so that they are ... For CGI scripts, I use .cgi for CGI scripts that run in the traditional ... A standard Debian installation includes the Perl interpreter: ... interpreter, load a Perl interpreter module, or have a Perl ...
    (Debian-User)
  • Re: CGI python use "under a curse"
    ... The so-called administrator is wrong: ... Perl to test just any old CGI scripts. ... which parses python. ...
    (comp.lang.python)