Reconsidering Python

Well, I suppose it’s time for me to confess one of my least accurate technology assessments of the last 5 years or so.

Back in 2002, I was a consultant evaluating different open-source content management systems for my company, with an eye towards potentially adopting one as our in-house development platform. After looking over what seemed like dozens of them, I came away dissatisfied with the lot.

That’s neither here nor there (they ended up writing their own CMS in the end), except for one thing I said in evaluating the Zope CMS:

… cool architecture, but only lets you code in Python, a dead-end language.

Yep, I called Python, which has blossomed in the last few years into such popularity that people speak seriously about it replacing Java, a “dead-end language.” Doh!

What I was getting at with that remark was my sense at the time that Python was interesting in an academic sense, but not a business sense; it might be really cool, but there weren’t many people using it, the tools were thin on the ground, and you were generally locking yourself into a limited space if you went with it. Compared to the thriving ecosystem around PHP, for example, it didn’t seem that compelling.

I was clearly wrong on that score. Python eventually gained critical mass, there’s now a raft of good tools that work with it, and it’s finding its way into more and more niches every day. (Some of its buzz has been stolen in the last few months by Ruby, but Ruby in 2006 has a lot of the same problems I saw Python having in 2002.)

All of which is a rather long-winded way of saying that I decided recently that, as penance for being so dumb four years ago, I should sit down and try to learn how to program in Python.

I won’t bore you with a lot of details about what makes Python different from other languages. The short version is that Python is a joy. I was really, honestly surprised by both how quickly I was able to be productive with it, and how much I could get it to do with just a few lines of code. For someone whose “real programming” experience started with the verbosity of Perl, Python is an eye-opener.

Now I find myself tempted to dive into the deep end and start playing with Python-based frameworks like Django and TurboGears for my Web development work. And then there’s Jython, which brings the Java class libraries into Python, to explore, as well as wxPython for GUI apps…

Anyway, if you’ve been like me and had your eyes closed to Python for the last few years, take this as my recommendation that you drop your preconceptions and check it out. I think you’ll like what you find.


Comments

Sandy Smith

April 4, 2006
12:52 am

I’ve long been enamored of some aspects of Python (ahem: white space nazi-alert). But it’s still a niche compared to PHP–try hiring somebody who’s good in Python. They’re not easy to find.
That doesn’t rule it out for me, but that coupled with some early mistakes (mailman using serialized objects as a data store…WTF?) on the application side means it’s been a dark horse for me all this time, though I’ve kept my eye on it.
So basically, it’s on the plus side, you get to use Python. On the minus side, you have to find Python programmers. If you’re a one-man band or you have a good team of programmers you think you can keep (or acquire more of), then good on you.
My biggest wish is that I could use PHP 5 so I could enforce some discipline on people, but I refer you back to the nazi statement above.

Ginger

April 4, 2006
11:21 am

I think it’s cute that you referred to coding as a joy.

Jason Lefkowitz

April 4, 2006
1:05 pm

Ginger: yes, I am a huge, huge dork. 🙂
Sandy: I think the thing that drove me to look again at Python, more than anything else, was not so much the sense that _lots_ of people were using it, but the sense that there was a corps of really outstandingly smart people using it. I keep seeing cool things popping up whose only common denominator is that they are written in Python. (Heck — game god Sid Meier even embedded Python scripting in Civilization IV.) When you keep seeing things like that, eventually you figure there must be something to it… I guess I just take longer to get the hint than most 😉

Maik

April 6, 2006
11:05 am

Have you considered using Zope3? You mentioned the Zope Application Server (not CMS) in the first place…

Jason Lefkowitz

April 9, 2006
11:15 pm

Maik, I’ve flirted with Zope periodically but it’s always seemed too heavyweight for me. I hear it gobbles up RAM like nobody’s business. Of course, if anyone out there knows better, I’m willing to be proven wrong…