Examples and ideas from the Learning Python book.