Category Archives: python

len() calls to python strings

I’m pretty confused about the results I’m getting from a little python test involving len() on strings. Since strings are immutable, I was wondering what happens when len() is called, and what performance considerations I may need to keep in mind. I figure if it was immutable, calls to len() might get cached, and there […]

idea:schema2class using breve and metaclass

I’m sorry this renders so poorly. WordPress won’t let me use CSS, so I’m stuck, until I get a proper site of my own. Try either http://deadbeefbabe.org/paste/4031 or http://pastebin.ca/399774 to see it better. “”” An experiment using breve xml library, and metaclass. Author: Ben West Email: bewest at gmail blog: https://bewest.wordpress.com/ I hang out on […]

s-expression templating in python

I’m constantly on the hunt for the perfect templating module. When I was much younger, primarily doing PHP, I quickly saw that string concatenation and variable interpolation were not good solutions when trying to author lots of complex documents. I did some searching, and found Smarty, which satisfied my needs at that time. Over the […]

toolbox: breve for xml generation in python

Every once in a while, I head over the cheeseshop and just scroll down. It’s really nice to see so many cool things. Today, I caught Breve, which is evidently inspired by Stan. The guy that wrote it wrote a Turbogears plugin to support stan, and seems very familiar with it, which drove him to […]

tools: atom and atompub

I just had a realization that I’ve been trying to invent ATOM and the Atom Publishing Protocol. I’ve been pining for web services, and a standardized way for representing resources and URI publishing patterns. I wanted it to work with storage engines of my choosing (eg, mercurial) so that I could use my favorite tools […]

toolbox: webdev unicorns: intro (0/4)

After years of using php for web development, my needs have changed, and I’ve decided to use python. I’ve been struggling to refill my toolbox with tools that suit my needs, and this post is the intro to a series of posts to capture my current findings in this search. There are five parts: intro […]

toolbox: webdev unicorns: templates (1/4)

Templating is an important way for multi-disciplined teams to work together on software projects. In addition, they serve as an important component for making applications loosely coupled and more easily understood. Templating Kid, the templating language isn’t working out for me very well. There are some basic things that I don’t understand how to do, […]

toolbox: webdev unicorns: servers (2/4)

Servers This is kind of a big topic because several components are so interconnected. Exposing Code to the Web I like cherrypy’s approach of navigating an object hierarchy slightly better than django’s approach of evaluating a list of regular expressions. The problem, of course, is how to deal with URIs that are illegal python symbols, […]

toolbox: webdev unicorns: components (3/4)

The web is a big place, and being a part of it increases the value of both the network your application interacts with and your application. This creates a need to interoperate with other applications on the web, the fulfillment of which actually helps create a better end-user experience. What this boils down to are […]

idea: todo: improve amara’s scimitar api

First of all, if you haven’t seen amara yet, go check out amara today and stick it in your toolbox. It’s a very very nice library for python that lets you create objects out of XML documents. One of the nifty things amara provides, it scimitar, which is an implementation of schematron, a rich schema […]