For completeness: to see warnings, import
warningsToBrowser. They will not be printed by default though - call
warningsToBrowser(1); to enable and
warningsToBrowser(0); to disable printing them. Output comes in the form of HTML comments. Note that warnings raised during disabled output don't get lost - they accumulate and get dumped the next time you enable output. I usually just put a
warningsToBrowser(1); at the end of my script so that I get all the warnings in a neat pile at the bottom of my CGI generated page.
Makeshifts last the longest.