Error Checking in Python CGI

When writing a cgi script in python, you will probably have a few errors in your code – normally all your left with is a blank screen or a cryptic message so its very hard to debug.

Add these lines of code to your script to get detailed information about errors:

import cgitb
cgitb.enable()