Archive for the ‘ Python ’ Category
As any good python developer does, I make heavy use of python’s iterator protocol. It’s easy, it’s efficient, it’s a good thing. As you know, an iterator consumes an iterable piece by piece each time “next” is called — which means that the next value cannot be peeked without incrementing the iterator (thus consuming the [ READ MORE ]
The python group at OASIS has been busy making plone do backflips! We’ve hooked up several Zeo instances to nginx and varnish — cool stuff. After the grunt work of digging through config files we faced the problem of how to test our setup; but none of us wanted to do end-user testing for thirty [ READ MORE ]
“So why programming, what is it really?” Programming is writing instructions for how parts make a whole. Take, for instance, legos. Remember getting legos for your birthday? Did you read the instructions or just start building? To build the lego Millennium Falcon you must assemble thousands of parts according to the blueprint. “Legos are fun, but what [ READ MORE ]
Ok. So recently I posted some code for a simple templating utility that I wrote. I’ve done some refactoring and have an even cooler version. This version better extends the behavior of string.Template and I’ve found it to be far more intuitive to use. Without further ado: import string class SimpleTemplate(string.Template): """ [ READ MORE ]
Ready for the simplest templating utility ever? I was trying to prepare some JSON data stored in a tree and needed some simple code to generate templated text. Below is a wrapper for python’s string.Template class: import string class SimpleTemplate(string.Template): """ Takes a string template and a tuple or list of identifier names [ READ MORE ]
Hi all – so I’ve been busy as hell but that’s ok, there’s always time for some fun. In my earlier posts I described how one could construct a tree using balanced ternary – it’s implementation time! Lets begin by creating a really simple binary search tree. [ READ MORE ]
I’ve been wanting to teach a course for some time and I am now being afforded the chance. The target audience are people who have never written a line of code; and what I’d like to do is get people interested in python programming using humor and non-technical metaphor. After some thought, I roughed out [ READ MORE ]
If you haven’t seen this, then go here immediately and consider the possibilities of this toolkit: http://thejit.org/. The JIT is a javascript library for advanced knowledge visualizations and hot damn its cool. The only problem is that its in javascript and I’m a python programmer. [ READ MORE ]
No introductions needed as the title says it all. First of all, del.icio.us rocks. For all who don’t know what delicious is, you should read about it, maybe start an account. For us python jocks, Michael G. Noll has written a pretty good python API. As of July 14th 2009, there’s a bug in the deliciousapi [ READ MORE ]