Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #111886

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

From Malcolm Greene <python@bdurham.com>
Newsgroups comp.lang.python
Subject Possible to capture cgitb style output in a try/except section?
Date 2016-07-26 06:11 -0400
Message-ID <mailman.125.1469527867.22221.python-list@python.org> (permalink)
References <1469527864.2996118.676987281.0EE8893F@webmail.messagingengine.com>

Show all headers | View raw


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

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Possible to capture cgitb style output in a try/except section? Malcolm Greene <python@bdurham.com> - 2016-07-26 06:11 -0400
  Re: Possible to capture cgitb style output in a try/except section? Steven D'Aprano <steve@pearwood.info> - 2016-07-26 23:40 +1000

csiph-web