web page programs

Sheila King sheila at spamcop.net
Sat May 19 21:31:24 EDT 2001


On Sat, 19 May 2001 20:23:48 -0500, "Servo" <theservo at bellsouth.net> wrote in
comp.lang.python in article <e%EN6.5144$M8.264038 at news1.atl>:

:Hey Guys,
:
:I'm going to attempt to make a client side web page program that will ask
:the user to input some simple information (through text entries, list boxes,
:etc.) and it will then save the information to a file. At that point some
:computation will be performed on the data and the output shown, as a
:webpage.
:
:How would I go about doing this, if it is at all possible?
:Would it be possible to send the information via the post method to a Python
:script?

It is certainly possible to do this. You should use the cgi module that comes
with the standard Python distribution. You need not concern yourself with what
method is used to get the information from the script. However, when you write
your form for your web page, POST is certainly a good method. But as far as
writing the cgi script in Python, if you use the cgi module, it will
automatically handle things for you, regardless of what method is used.

Here are the basics for writing cgi scripts in Python:
http://www.python.org/topics/web/basic-cgi.html

You are welcome to look at a script that I wrote, called GypsyMail. It is here:
http://www.thinkspot.net/sheila/computers/software/gypsymail.html

It doesn't write the info to a file. It composes an email and sends the email
out. However, there may be things there, that would help you with some parts of
what you are trying to do.

--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/






More information about the Python-list mailing list