Web Scripting with Python. (was Re: [Tutor] Where is PYTHONPATH set?)

mbc2@netdoor.com mbc2@netdoor.com
Wed, 8 Nov 2000 20:06:52 -0600 (CST)

On Wed, 8 Nov 2000, Daniel Yoo wrote:

> As long as you're running the right executable, you shouldn't run into
> difficulties with library locations.  Since you mentioned that you have
> several versions of Python on your system, make sure that you're running:
>     /usr/local/bin/python
> instead of
>     /usr/bin/python
> My guess is that your PATH is set up so that binaries in /usr/bin take
> precedence over those in /usr/local/bin.  You can check for this by doing:
>     which python
> at your prompt, and see which Python your system finds first.

Yeah, that was the problem. Thanks! I actually had binaries for 1.5 and
1.6 in /usr/bin and a 2.0 binary in /usr/local/bin. Deleting the binaries
in /usr/bin did the trick. I can now get the cgi programs to work and I
was able to compile PgSQL and connect to my database, so I should be in

Is there a best way to use python for web programming? I've used php in
the past to create small scripts that process user input or query a
database. But I'd like to start working on something larger and I'd 
like to use Python. Python looks more powerful, and the scripts I've
written in it so far have been cleaner looking that the same ones
php. I've looked at mod_python but I guess I don't understand what it does
(despite having read the documentation and installed it). Is something
like this recommended?