Gray Hat Python : Python programming for hackers and reverse engineers / by Justin Seitz, No Starch Press, 2009
If you can get over the not-quite-black-hat metaphor, this book is a good introduction to Python and web security. It contains just enough information to get you hooked, and then you will need other more complete books or some good web resources. 200 pages.