Python Server Pages

By | | PHP

Via Simon’s blogmarksPython 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? ;)

Written By:

Harry Fuecks

Harry has been working in corporate IT since 1994, with everything from start-ups to Fortune 100 companies. Outside of office hours he runs phpPatterns: a site dedicated to software design with PHP that aims to raise standards of PHP development. He also maintains Dynamically Typed: SitePoint's PHP blog.

 

{ 10 comments }

Anonymous January 23, 2006 at 4:57 pm

spyce.sourceforge.net is the best implementation of Python server pages.

yangce November 30, 2005 at 6:11 am

is there anyone know perl server pages or ruby services pages?
thanx

Mary October 13, 2004 at 3:02 pm

Hi, what huppen with security on PSP? have problems of browsers??

thanos September 4, 2004 at 6:19 am

use php (nocgi) since you’ll be able to get started quickly.

Gokul September 3, 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..

premshree March 11, 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.

ruach March 3, 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

alr March 2, 2004 at 2:33 pm

eeexxxellent smithers!

Hannes Gassert March 2, 2004 at 10:11 am

Greate last sentence!
“Then fall, PHP!”, to conclude your quotation :)

Tim Parkin March 1, 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

Comments on this entry are closed.