Examples from the "Gray Hat Python" book by Justin Seitz, for OS X