Promoting Python as web application development language
phr-n2002b at NOSPAMnightsong.com
Fri Aug 23 16:10:49 CEST 2002
Max M <maxm at mxm.dk> writes:
> There are several web tools for use with Python.
Someone just posted a URL with a list yesterday, and I forgot to
bookmark it :(. However, IIRC, most of them are still in beta. For
production sites I'd rather use production software.
> > Python doesn't
> > have an SQL interface module in its standard library like PHP.
> Python has a nice dbi spec that supports a lot of databases. Any db I
> would care to use anyhow.
Maybe there's a nice spec, but there's no actual runnable
implementation included with Python. It's more stuff to integrate.
> > 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.
> Hmmm that is a bad way to code. There are som systems that use it
It's an ok way to code some of the time. You don't want to do huge
functions that way, but we're talking about embedding 2 or 3 short
Python statements to spew a value in a table cell or something like that.
If you're generating your HTML in some kind of visual layout editor,
it's hard enough dealing with template systems already. Having to mess
with adjusting indentation too is just more headache than you need.
> I would recommend that you use cheeta instead, or perhaps even
> Zope Page Templates as they can be used outside of Zope, to get better
> seperation of logic and layout.
I'll look for something about those. I'd never heard of cheeta before.
> Because Python is a good and practical language it usually has several
> solutions to the problems that a 'language' like php has only one
> solution to.
I think Python is better for writing complex application logic but PHP
is better for putting HTML up on the screen.
> This makes it more likely that Python has a future in web development
> than a language like php.
That might be true of Python's future, but I'm talking about its present.
More information about the Python-list