Promoting Python as web application development language

Paul Rubin phr-n2002b at
Fri Aug 23 13:26:00 CEST 2002

Fabian Fagerholm <fabbe at> writes:
> In a recent thread [0] on the mod_python [1] mailing list, I'm wondering
> why there isn't a Python link on the main Apache web site. There are
> PHP, Perl and Tcl links but Python is nowhere present.
> It is of course evident that the lack of a link is due to the lack of
> perceived usage of Python as a web application development language.
> That, in turn, is due to the lack of exposure on sites like the Apache one.

I don't know about Tcl, but I think Python isn't as well-developed a
system for web programming as Perl or PHP.  The only production
application shell / template system I know of is Zope, which is
overcomplex and apparently dog slow.  (There are some other ones like
PyHP that are coming along but are still in beta).  Python doesn't
have an SQL interface module in its standard library like PHP.  It
doesn't have security features like taint checking that Perl has.  The
indentation syntax is nice for normal programming but it's a pain in
the neck for template programming where you're mixing Python code and
HTML and you more often want to jam multiple statements on a line.
(At least one of the Python template systems actually included some
hack to preprocess curly braces into whitespace, so you could nest
with {}.)  Its maintainers take an unconcerned attitude towards the
needs of internet developers; for example, for a very long time the
default behavior of was to open a gaping security hole in
your web site if you used it (this situation has recently improved due
to changes in the pickle module).  The response to the problem was to
document the security hole rather than fix it.  That's better than
nothing--it's like putting red flags around a hole in the sidewalk
that people could fall into--but I'd feel more looked-out-for if the
hole actually got fixed rather than just flagged.  Perl is an
absolutely horrible language and Python is a beautiful one, but I feel
like the Perl crowd has a better attitude toward these real-life issues.

Anyway, I think there's somewhat of a chicken-and-egg problem.
Python's lack of exposure for web development comes from a lack of
use, which comes at least partly from a lack of completeness in its
capabilities.  If I were setting off to build a big web site today, I
don't know at all that I'd use Python, though of course I'd want to.
I'd have to look hard for ways to overcome the problems I see, and I'm
not sure how it would end up.  Maybe I'd use PHP for the web layer and
Python for complicated backend functions.  

More information about the Python-list mailing list