blogs and preservation

Ms. PyMOTW sent me a link to the survey UNC-Chapel Hill School of Information & Library Science is conducting called “Blogger Perceptions on Digital Preservation”. If you blog, you might want to go participate. They ask thoughtful questions, and it only takes 5-10 minutes.

PyMOTW: Example code

All of the example code for the Python Module of the Week series is available for download. You can download it directly from, or use easy_install to grab it from PyPI.

PyMOTW: logging

The logging module defines a standard API for reporting errors and status information from all of your modules. The key benefit of having the logging API provided by a standard library module is that all python modules can participate in logging, so your application log can include messages from third-party modules. Read more at logging

Book Review: CherryPy Essentials

A little over a week ago I received a review copy of Sylvain Hellegouarch’s new book, CherryPy Essentials, published through Packt Publishing. The timing couldn’t have been better, since we have begun investigating Python web application frameworks at work for a new project. From previous work I have done with TurboGears, I knew that CherryPy was a contender, so I was definitely interested to see what version 3 had to offer.


Back in January I described an idea for a site to build network graphs of people in public life. It looks like unfluence is doing something like what I envisioned, automatically. The data is based on state campaign donations from the National Institute on Money in Politics. Oh, and it sounds like they are planning to release the source in some form, too.

ironic enough?

I can’t decide if I should order one of these t-shirts from Alexa or not.

PyMOTW: bisect

The bisect module implements an algorithm for inserting elements into a list while maintaining the list in sorted order. This can be much more efficient than repeatedly sorting a list, or explicitly sorting a large list after it is constructed. Read more at bisect

PyMOTW: linecache

The linecache module is used extensively throughout the Python standard library when dealing with Python source files. The implementation of the cache simply holds the contents of files, parsed into separate lines, in a dictionary in memory. The API returns the requested line(s) by indexing into a list. The time savings is from (repeatedly) reading the file and parsing lines to find the one desired. This is especially useful when looking for multiple lines from the same file, such as when producing a traceback for an error report.

codehosting now supports feedburner

I just posted a new version of my codehosting project for django which supports passing the Atom feeds for release updates through There isn’t anything tying the implementation to FeedBurner, of course, but since that’s why I wanted the feature that’s how I am describing it. One tricky bit was I wanted all of the existing subscribers to my feed(s) to be redirected to the FeedBurner URL. I couldn’t just add a redirect rule in Apache, since not all of the feeds are set up with FeedBurner yet.