Useful Python odds and ends.