[Tutor] Questions on CGI script

Ms Soo Chong s4046441 at student.uq.edu.au
Sat Aug 21 15:10:23 CEST 2004


Hi,

Kent, thank you so much for your reply. I will take a good
look of the cgi-shell and try it out tommorrow morning.
I will send you the Server Error if I happened to meet it 
again (hopefully NOT).

Anyway, should I create another .html file for the form or
type it in the script?

Thank you anyway for your help.

Shufen

----- Original Message -----
From: Kent Johnson <kent_johnson at skillsoft.com>
Date: Saturday, August 21, 2004 10:44 pm
Subject: Re: [Tutor] Questions on CGI script

> Shufen,
> 
> What are the details of the Server Error?
> 
> VoidSpace has a few CGI examples you could look at.
> cgi-shell is very simple example - it creates a form with one 
> entry field 
> that accepts a shell command. When you submit the form it executes 
> the 
> command and shows you the result. 
> http://www.voidspace.org.uk/atlantibots/cgi-shell.py
> 
> nangram is a more complex example - 
> http://www.voidspace.org.uk/atlantibots/pythonutils.html#nana
> 
> Kent
> 
> At 08:53 AM 8/21/2004 +1000, Ms Soo Chong wrote:
> >Thanks Kent for the useful example but I'm still having some problem.
> >I tried the typing the code (from the webpage) and generate it, 
> hope to 
> >see some output
> >and learn from there. But it shows Server Error on the web 
> browser. (After 
> >reading
> >through the example - Writing CGI programs in python, I thought I 
> >understand whats
> >going on but in fact maybe not, since I still failed to generate 
> a form 
> >and output.)
> >
> >http://www.devshed.com/c/a/Python/Writing-CGI-Programs-in-Python
> >
> >I wanna to display a text box where user type their query msg and 
> a submit 
> >box to
> >process the query. Should I create another html file and open in 
> read mode 
> >in my actual script? Then,
> >
> >import cgi
> >form = cgi.FieldStorage()
> >
> >It may be simple to alot of people but sorry I don't really 
> understand the 
> >procedure
> >of writing a cgi script. Can someone please help me by giving a 
> simple 
> >example on
> >generating a search and displaying the result? Greatly appreciated.
> >
> >I have been trying for the past two days without bothering python 
> tutors 
> >but I still can't get it done. HELP.
> >
> >Thank you in advance.
> >
> >Shufen
> >
> >
> >
> >
> >
> >
> >
> >
> >_______________________________________________
> >Tutor maillist  -  Tutor at python.org
> >http://mail.python.org/mailman/listinfo/tutor
> 
> 



More information about the Tutor mailing list