Miscellaneous Python bits and pieces.