I don't do any Python CGI but, have a couple of books that I can look through. I'll insert links to view these books, though I check them out at the library and really go through them before deciding if they are keepers.
I remember a friend letting me look over "
Web Programming in Python" when I was first getting started, and it had a good intro to python along with all the web stuff.
"
Python Phrasebook" has about 36 pages of good examples in this category.
"
Python Cookbook" is one of the best libraries of everyday examples I have found and it has 20 pages on web and CGI