Generator Expressions in Python

I have long been a fan of list comprehensions in Python, but it's only recently that I discovered a related piece of sugary syntax: generator expressions. Now, instead of something like: sum([item.price for item in self.item_set.all()]) I do: sum(item.price for item in self.item_set.all()) Just that little bit cleaner and more efficient......

Posted in python at 2008-02-10T23:41:51Z.

pythontracer

Lets you see your Python program's execution as a tree of function invocations, each tree node exposing the real time, and CPU time (user/sys) of that call. This looks pretty cool, I will have to try this out on some of my Django projects....

Posted in python profiling at 2008-03-09T00:20:40Z.

Django 1.0!

Finally, Django 1.0 is released! After countless hours of hard work by many talented people, it is a pleasure to see the long-awaited version 1.0 released to the world. Finally, a version number that reflects the quality of the codebase, which in fact I have been using in production for many months. New features that I am excited about include: Re-factored admin application Developed under ...

Posted in django python programming at 2008-09-04T09:06:43Z.

Edit CouchDB Attachments Directly with CouchDB-FUSE

After some hacking about with the rather badly documented Python FUSE bindings, I have finally managed to mount a CouchDB document's attachments directly onto a virtual filesystem! Use Cases If you've read My Couch or Yours? Shareable Apps Are The Future by jchris, this is a great time-saver if you want to edit HTML, JavaScript, CSS or even image files directly using your favourite editor.Uploadi...

Posted in couchdb couchdb-fuse fuse python at 2008-11-25T22:50:00Z.

CouchDB on Wheels

Ely Service now runs on CouchDB. Things just got a little simpler: no more Django plus PostgreSQL plus Nginx. Casual Lofa: the World's fastest furniture Ely Service is, as J. Chris Anderson put it, “just a very ordinary-looking garage Web site”. It's a simple Web site, which I originally developed using Django. It consists of six pages, one of which has a contact form for sending emails. So ...

Posted in couchdb couchapp e-mail python nginx at 2009-05-08T00:30:00Z.