The codecs module provides stream and file interfaces for transcoding data in your program. It is most commonly used to work with Unicode text, but other encodings are also available for other purposes.
Read more at pymotw.com: codecs
The math module implements many of the IEEE functions that would normally be found in the native platform C libraries for complex mathematical operations using floating point values, including logarithms and trigonometric operations.
Read more at pymotw.com: math
doctest lets you test your code by running examples embedded in the documentation and verifying that they produce the expected results. It works by parsing the help text to find examples, running them, then comparing the output text against the expected value. Many developers find doctest easier than unittest because in its simplest form, there is no API to learn before using it. However, as the examples become more complex the lack of fixture management can make writing doctest tests more cumbersome than using unittest.
The argparse module was added to Python 2.7 as a replacement for optparse. The implementation of argparse supports features that would not have been easy to add to optparse, and that would have required backwards-incompatible API changes, so a new module was brought into the library instead. optparse is still supported, but is not likely to receive new features.
Read more at pymotw.com: argparse
gc exposes the underlying memory management mechanism of Python, the automatic garbage collector. The module includes functions for controlling how the collector operates and to examine the objects known to the system, either pending collection or stuck in reference cycles and unable to be freed.
Read more at pymotw.com: gc
Creating custom processing instructions for Sphinx is easy and will make documenting your project less trouble.
Apparently 42 is a magic number.
While working on issue 42 for virtualenvwrapper, I needed to create a link from the history file to the newly resolved issue. I finally decided that pasting the links in manually was getting old, and I should do something to make it easier. Sphinx and docutils have built-in markup for linking to RFCs and the Python developers use a custom role for linking to their bug tracker issues.
Today I reset my 30GB video iPod and all of the smart playlists broke. Some were sorted in the wrong order (by name), some had no contents, and some were missing entirely.
I found a few references to the same problem:
iTunes 9.1 – Smart Playlist Sort Order Still Wonky iTunes 9 + Smart Playlist + Live Updating + iPhone = FAIL Preserving smart playlist order on iPhone and then this “fix” from Apple None of those solutions worked for me.
What’s new? Yesterday I released version 2.1 of virtualenvwrapper. The primary purpose of this release is a set of enhancements to support virtualenvwrapper.project, a new extension to manage project work directories with templates.
The base project plugin gives you automatic creation of work directories to hold sources and other artifacts for a project. Each time you run mkproject you’ll get a virtualenv and a matching directory in $PROJECT_HOME. Continuing the theme of extensibility, there is also a new API for creating project “templates”.