python application cookbook