Via Simon’s blogmarks… Python Server Pages.
Finally!
Personally think this is great news. Up until now (ignoring third party Python projects which have tried this), mod_python has had an awkward deployment mechanism (much like mod_perl, if you know it) requiring definition of handlers, within Apache. Python Server Pages make it pretty much the same as creating PHP pages - just tell Apache to watch out for .psp files and away you go.
If you’re wondering why I’m talking about Python on a PHP blog, I don’t have a clear answer for you. Python is a very well designed language. For my tastes, perhaps most pleasant to work with, out of the dynamically typed family (e.g. Perl, PHP, JavaScript and Ruby).
As a solution for web applications, PHP has a significant head start over Python, with massive support amongst hosting providers and almost all the functionality you need “ready to go”. Also there’s a huge weight in supporting projects for PHP, as John Lim suggests here.
That said, Python comes with all those things that itch PHP developers, such as support for namespaces and an in-built (i.e. free) mechansim that stores a “compiled” form of your scripts. And things like the distutils solve many a headache for distributing your work.
So Python Server Pages is an alternative to PHP. Perhaps competition is a good thing, PHP being much like a monopoly these days.
Turns out Sterling Hughes, who’s one of PHP’s core developers, provided the basis for the PSP add-on to mod_python, as he mentioned a while back here. Et Tu, Brute? ;)






March 1st, 2004 at 3:45 am
Ah, the joy of Python.. as a PHP programmer who makes his living out of building PHP applications, I know the frustrations that can be had building systems in a language like PHP. The disadvantages of PHP have been documented many times so I won’t go into them. I’ll only say that I’ve been programming in PHP for a long time and I’m still being surprised by some behaviours.
Python, on the other hand, just lets you get on with coding. I find I hardly ever have to refer to the manual to try to understand behaviour as in most cases things act like you would expect (which is one of the tenets of the language).
I used to think that we’d still have to use a lot of PHP as people’s service providers offer it and are unlikely to offer Python. However, we can now get dedicated servers for £20 per month and virtual root servers for £10 a month. The only big reason not to use Python now is availability of developers, but in my experience so far clients don’t care what language their applications are developed in as long as it’s (i) recognised as a ‘legitimate’ programming language , and python is one of the LAMP bunch. (ii) won’t cost them any extra.
If you can show them that Python will actually cost them less (speed of development is at least doubled in my experience) then they should jump at the opportunity.
If you want to develop in Python, I suggest looking at Albatross (acts as a templating langauge) and Twisted/Nevow (Twisted is a http server system, amongst many other things, and Nevow is one of the most exciting templating frameworks I’ve seen).
p.s. The majority of our web development is now done in Python
Tim Pollenation Internet Ltd
March 2nd, 2004 at 10:11 am
Greate last sentence!
“Then fall, PHP!”, to conclude your quotation :)
March 2nd, 2004 at 2:33 pm
eeexxxellent smithers!
March 3rd, 2004 at 11:35 am
This IS great news ! and its about time. Personaly I love php for the web but I love python even more, just not for the web. If hosting companies began to support python and some good modules were developed to handle things like sessions, file uploads, cookies and the like I think that it could easily become the new king of the web. In do time of course. :’)
matthew
elijah.chpc.utah.edu
March 11th, 2004 at 5:57 am
Python is probably the simplest OOP language ever. I have programmed in PHP in the past; currently I’ve been using Python a lot, and evangelize its use.
September 3rd, 2004 at 7:58 am
Hi,
I’d like some of u guys advice me..
I’ve to design a course site manager 4 my university using any interface language.What wud u guys recommend??
php or cgi( integrated with python) or ZOPE??plz reply soooon
Thanx..
September 4th, 2004 at 6:19 am
use php (nocgi) since you’ll be able to get started quickly.
October 13th, 2004 at 3:02 pm
Hi, what huppen with security on PSP? have problems of browsers??
November 30th, 2005 at 6:11 am
is there anyone know perl server pages or ruby services pages?
thanx
January 23rd, 2006 at 4:57 pm
spyce.sourceforge.net is the best implementation of Python server pages.