Categories
Uncategorized

Debugging Python CGI Scripts – Python

Again, this is more for my reference than anything else.

Including the following lines on your Python CGI script will save you loads of time and stop you from hating yourself.

import cgitb
cgitb.enable()

You can even get the deluxe model by making it write a log file for you

import cgitb
cgitb.enable(logdir="location/of/logFile.txt")

It is all explained right here.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s