python vs php for web programming

email9898989 at yahoo.com email9898989 at yahoo.com
Thu Dec 11 13:44:11 EST 2003


mir4uu at yahoo.com (mir nazim) wrote in message news:<425cc8d1.0312110636.56be9ecf at posting.google.com>...
> i m currently using PHP with Apache (a.k.a 'mod_php') for my web
> development work. i came to know that python can also be used to do
> web programming using 'mod_python' for Apache. i wanted to know the
> difference between th two 'mod_php' and 'mod_python' in terms of:
> 
> 1. speed of execution.
> 2. productivity 
> 3. maintainance
> (i know python is most productive and maintainable language in the
> world, but is it same for web programming with Apache).
> 4. availability of features e.g, cookies and session hadling,
> databases, protocols, etc.

I can't really give you "the answer" if there is one, but here are
some resources I've found helpful:

http://colorstudy.com/docs/shootout.html
http://www.python.org/cgi-bin/moinmoin/WebProgramming

If you want something similar to PHP, see Spyce.  If you want to do
most of your coding in pure python, see Quixote or the cgi module.  If
you want to use templates (like PHP with Smarty), then see Cheetah,
Albatross, etc.  There are dozens of options now, but no one real
front runner popularity-wise (except maybe Cheetah for templates).

Realize though most web hosts out there though don't provide modpython
(or java for that matter), so try it out on your own computer first or
go with a python-friendly web host (some are also listed at the wiki).




More information about the Python-list mailing list