PyMOTW: locale

The locale module is part of Python’s internationalization and localization support library. It provides a standard way to handle operations that may depend on the language or location of your users. For example, formatting numbers as currency, comparing strings for sorting, and working with dates. It does not cover translation (see the gettext module) or Unicode encoding. Read more at locale


I recently came across a few articles by Esther Schindler on telecommuting which struck a chord with me. The first, “Getting Clueful: Seven Things the CIO Should Know About Telecommuting”, is directed at managers of telecommuters. It covers the benefits to the company of having telecommuters (cost savings, productivity, etc.), potential pitfalls (not everyone can manage themselves well enough to work remotely, ), and how to cope with them. She places a heavy emphasis on building trust in the manager/employee relationship, especially through communication.

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