This is really just a “note to self” kind of post. I meant to write this down a while ago but I forgot. To prevent further forgetting, here it is:

I always compile Python myself. The Python that comes with OS X tends to get outdated pretty soon and it has outdated libraries in its site-packages directory. And beware installing or updating anything in there, it might ruin core components of OS X (because they actually use this Python instead of one that’s not the user’s to modify). I know that MacPorts too has various Python versions but it then again it applies various patches to them and builds them in weird manners that I don’t understand (framework, etc.). So the best bet to get a clean and reliable Python installation is to self-compile (and then use virtualenv to prevent it from being messed up).

As it happens, when I compiled Python 2.5 or higher on OS X, it linked to either the OS X readline library or the MacPorts one. Which one I don’t know, but it was definitely hosed. So while the interpreter worked fine, the interpreter shell would crash with a Bus Error. So what I did was compile my own plain vanilla version of readline and installed it to /opt. Of course that didn’t work right away because readline wouldn’t build on OS X Leopard without applying a small patch to a build script.

After having installed readline, I configured Python with the (undocumented, but apparently existing) --with-readline-dir option:

./configure --prefix=/opt --with-readline-dir=/opt

and did the usual make && make install dance.

Nationalization? Really?

October 23, 2008

Germany’s banks haven’t been spared in this financial crisis and surely the German government has stepped up to provide a safety net of roughly €500bn ($640bn). Naturally, German politicians can’t resist the urge to call for nationalization of the bank sector, either.

What strikes me as most peculiar in all this is the fact that the banks that are in most trouble and have requested help from the Government’s safety plan were in fact state-controlled:

  • SachsenLB (state-controlled bank of Saxony) and LBBW (state-controlled bank of Baden-Württemberg) which have had an ongoing crisis since last year
  • KfW which happened to wire $500m to Lehman Brothers on the day the crisis came down on us (whoopsie!)
  • BayernLB, state-controlled bank of Bavaria, which was the first German bank to take the Government up on their offer to save the day.
  • … and the list could go on

I’m not denying something has to be done in the banking system to prevent things like this again. I have no clue what it is, I’m not an expert. But it seems to me that putting things under government control isn’t exactly a “Get Out of Jail Free” card. Heck, the banks that are doing the worst in this crisis and have been for the past year or so are state-controlled banks. It doesn’t take a slide rule to figure this out.

It just makes you wonder how ironic it is that Deutsche Bank’s CEO Josef Akkermann so far has refused to take money from the government’s safety plan for his bank. May he be the a**hole that the media are trying to make him look or not, in times like these, numbers seem to tell me I should put my money on him… a banker.

If you’re a Python web developer and are interested in fast templating, Chameleon might be of interest to you. Brought to you by that crazy Austro-Danish duo Malthe Borch and Daniel Nouri, it’s a byte compiler that bakes HTML/XML templates into Python (byte) code. Currently it has support for Zope Page Templates and Genshi. And it’s fast. Fricken fast. If I remember correctly, it doesn’t achive the same speeds as Google’s Spitfire in all benchmarks, but it’s in the same league.

Now Malthe and Daniel as well as some regular contributors such as Chris McDonough, Wichert Akkerman and Hanno Schlichting are perfecting ZPT and Genshi compatibility. With support for macros and i18n, it already looks like a serious contender to replace zope.pagetemplate in templating-heavy Zope apps such as Plone. In fact, Chameleon might be the perfect match for Alex Limi’s proclaimed faster and lighter Plone 4, next to ditching Archetypes, reducing the Component Architecture overdose and going more Pythonic.

That said, it’d be very interesting to see Chameleon being tried by the non-Zope crowd. repoze.bfg has already adopted it as its de-facto standard templating engine. Has anyone tried it with Django, Pylons, TurboGears yet?

Hear me tweet

October 22, 2008

I haven’t been blogging much lately mostly because I discovered Twitter. Blurting out short random thoughts seems to suit my brain better than coming up with full-blown articles. I tend to be a perfectionist when writing blog posts which is why it takes me more to write one than it probably should. And of course there are things that aren’t worth a blog article but you’d still like to shout them out there.

Anyway, I’ll still be blogging once in a while. But if you’d like to know what I’m doing and thinking in between, check out my tweets on Twitter.

Follow

Get every new post delivered to your Inbox.