Possible to capture cgitb style output in a try/except section?

Malcolm Greene python at bdurham.com
Tue Jul 26 06:11:04 EDT 2016


Is there a way to capture cgitb's extensive output in an except clause
so that cgitb's detailed traceback output can be logged *and* the except
section can handle the exception so the script can continue running?
 
My read of the cgitb documentation leads me to believe that the only way
I can get cgitb output is to let an exception propagate to the point of
terminating my script ... at which point cgitb grabs the exception and
does its magic.
 
Thank you,
Malcolm



More information about the Python-list mailing list