[Tutor] Why should I use Python??

Homme Zwaagstra hrz at geodata.soton.ac.uk
Tue Jan 13 04:57:51 EST 2004


> For web development in Python, most people use Zope,
> which has its own templating language called DTML.
> DTML can be used similarly to HTML embedding in PHP,
> but most of the coding is seperated out in DTML.

If you're able to deploy your websites using the Apache webserver I
recommend looking at mod_python (http://www.modpython.org) in addition
to Zope. Mod_python integrates Python with Apache resulting in a very
powerful web development environment. The project is under active
development and the next version (currently in beta) will support
Cookies, Sessions and HTML embedded python (so you can use the <% %>
paradigm if you want!).  All of this will make migrating from PHP much
easier.

If you don't have Apache then there's always the Python CGI module
(http://www.python.org/doc/current/lib/module-cgi.html) or a toolkit
such as Albatross (http://www.object-craft.com.au/projects/albatross).

I agree with Daniel that for simple applications PHP is the way to
go. Having programmed extensively in PHP, however, I've found that PHP
4 starts to get unwieldy for large projects. Python scales much
better, is easier to extend using C or C++ (check out Boost.Python at
http://www.boost.org/libs/python/doc/index.html) and, being a more
general purpose language than PHP, is a better 'glue' between
different system components. All IMHO. PHPs scalability issue,
however, may be addressed with the upcoming release of PHP 5 with it's
refined object orientation and exception handling. 

Good Luck!

Homme



More information about the Tutor mailing list