[Python-Dev] unicode() and its error argument

Jon Ribbens jon+python-dev@unequivocal.co.uk
Sat, 15 Jun 2002 16:44:54 +0100

Skip Montanaro <skip@pobox.com> wrote:
> This reminds me, it occurred to me the other day that a plain text version
> of cgitb would be useful to use for non-web scripts.  You'd get a lot more
> context about the environment in which the exception was raised.

I have code adapted from cgitb in my jonpy cgi module which
simultaneously does text and optional html fancy tracebacks.

See the function "traceback" in:


the 'req.error()' calls are doing the text traceback, simply remove
the stuff that says 'if html' to remove the html traceback and then do
a search&replace from req.error to out.write() or something.