Some Python Snippets from The Python Cookbook