Questions from a pre-newbie

Alex Rice alrice at swcp.com
Fri May 14 19:24:53 EDT 1999


Joern Stoeylen wrote:
> 
> Hi, everybody.
> 
> I know a little programming (fooled around with C++ some years ago and
> have been playing a little bit with JavaScript lately). What I've seen
> of Python after snooping around on the web, I think it should be pretty
> easy to learn.
> 
> But as I have no experience at all on CGI programming, I'd like to know
> how easy it is to do this, and what's needed, both from me and from my
> ISP.

CGI programming is actually pretty easy, especially with scripting
languages like Python or Perl. There is a ton of material on the web and
on Usenet comp.infosystems.www.authoring.cgi

http://www.python.org/doc/current/lib/module-cgi.html has some good info
in it as well.

> Let me give you a concrete example: I'd like to make a script for
> password protecting a section of my homesite (see link in my signature)
> containing personal info for my friends and family.

You don't need CGI for this. I'd recommend using .htaccess -- it's a
better way. http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html

> 
> I've downloaded and installed Python 1.5.1 for Mac. So, my question is:
> What do I do now? Write a program, compile(?), put it (where?) on my
> site, does this require that my ISP has Python installed also, etc.
> etc...

Here is a minimal CGI program in python. Assuming that your ISP has
given you CGI access, and they have Python installed on their server,
you are good to go.

#!/usr/local/bin/python
import cgi
cgi.test()

> 
> I'm not asking for a complete course, but I'd like to know how easy this
> is, and if I have to contact my ISP (http://www.eunet.no) and ask them
> to set up anything.

Ask them to set you up with CGI access.
 
> Or do I have to set up my own server to do things like this?

No definitely not.

> Please, help me, and convert me into a snake! :-)

poof-you-are-a-snake

Alex Rice




More information about the Python-list mailing list