import cgitb
cgitb.enable() #This enable it all
cgitb.enable() #This enable it all
Two lines :)
Simply put them at the beginning of a script and they do all the work. It's also possible to output errors in a log file instead of displaying them in the browser of the user (just take a look at python documentation on cgitb.enable()), a far better solution for production environment.
No comments:
Post a Comment