I've been using html formatted tracebacks in my handlers for a little while, and it's working rather well. Here's my proposal to add it to mod_python. Once we've reached agreement I'll add it and attach the files.
-Add a file exception.html to mod_python directory, it is the standalone html page used for displaying tracebacks. It is loaded once as a string.Template instance and cached. The template has one variable, $traceback, which is substituted with the normal mod_python traceback. -The logic for formatting the traceback resides in exception.html as javascript and can be fully customized. If it encounters an error during formatting or if javascript is disabled, the traceback will be visible as normal with no formatting. -Uses markup and css to highlight important information in the traceback. This can be customized by editing the styles in exception.html. If you wish, by editing the javascript in exception.html, you can have complete control over how the traceback is formatted. -Supports filters easily defined in the javascript that can hide or show traces conditionally. By default a filter is enabled that hides mod_python traces. When hidden, traces shrink down to 2px high colored stripes. By clicking on the appropriate toggle link at the top of the traceback you can toggle the filter to show or hide the matching traces. -One new option is added at the outermost scope of httpd.conf, defaulting as: PythonOption mod_python.html_traceback On Which if set to Off, will result in the usual tracebacks you get in mod_python. Screenshot of demo attached. -Dan
sample_traceback.png
Description: PNG image