By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,621 Members | 1,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,621 IT Pros & Developers. It's quick & easy.

More verbose traceback

P: n/a
Hi!

Has someone written a script which
dumps a traceback in a more verbose style?

This should include the information you
see with cgitb. I like this very much.

You see the values of the important variables
in the traceback. I need something like
this, but it should be plain ascii, not html.

thomas

Jul 18 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Thomas Guettler" <gu*****@thomas-guettler.de> writes:
Hi!

Has someone written a script which
dumps a traceback in a more verbose style?

This should include the information you
see with cgitb. I like this very much.

You see the values of the important variables
in the traceback. I need something like
this, but it should be plain ascii, not html.


I beleive there's a patch on SF (to cgitb) that does this.

Cheers,
mwh

--
But since your post didn't lay out your assumptions, your goals,
or how you view language characteristics as fitting in with
either, you're not a *natural* candidate for embracing Design by
Contract <0.6 wink>. -- Tim Peters, giving Eiffel adoption advice
Jul 18 '05 #2

P: n/a
"Thomas Guettler" <gu*****@thomas-guettler.de> wrote in message
news:pa****************************@thomas-guettler.de
Hi!

Has someone written a script which
dumps a traceback in a more verbose style?

This should include the information you
see with cgitb. I like this very much.

You see the values of the important variables
in the traceback. I need something like
this, but it should be plain ascii, not html.

thomas


Hi,
I'm working to a tool which collects all informations related to
a traceback object a saves them in XML format. There is also a
graphical program you can use to analyze dump files created by this
tool. It's name is PyCrash and you can find it at

http://pycrash.sourceforge.net

I hope that it will be useful for you.

Carmine Noviello
--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
Jul 18 '05 #3

P: n/a
Thomas Guettler wrote:
Hi!

Has someone written a script which
dumps a traceback in a more verbose style?

This should include the information you
see with cgitb. I like this very much.

You see the values of the important variables
in the traceback. I need something like
this, but it should be plain ascii, not html.


Have a look at the formatTraceback function in the util.py module of Pyro.
(http://pyro.sourceforge.net) It prints tracebacks like this:

[IdJ] d:\>python test.py
--------------------------------------------------
<exceptions.ZeroDivisionError> RAISED : integer division or modulo by zero
Extended Stacktrace follows (most recent call last)
--------------------------------------------------
File "test.py", line (15), in ?
Source code:
funcB("hello")
File "test.py", line (11), in funcB
Source code:
result=funcA(1)
Local values:
localB = 'inside B'
--------------------------------------------------
File "test.py", line (7), in funcA
Source code:
print arg/0
Local values:
arg = 1
localA = 999
--------------------------------------------------
<exceptions.ZeroDivisionError> RAISED : integer division or modulo by zero
--------------------------------------------------
when used as follows:

try:
...something...
except:
print "".join(Pyro.util.formatTraceback( *sys.exc_info() ))

HTH,

--Irmen de Jong.
Jul 18 '05 #4

P: n/a
Michael Hudson <mw*@python.net> wrote in message news:<m3************@pc150.maths.bris.ac.uk>...
I believe there's a patch on SF (to cgitb) that does this.

Cheers,
mwh


I'm pretty sure this was integrated into 2.3; cgitb has a text function, at least.

Jeremy
Jul 18 '05 #5

P: n/a
tw*********@hotmail.com (Jeremy Fincher) writes:
Michael Hudson <mw*@python.net> wrote in message news:<m3************@pc150.maths.bris.ac.uk>...
I believe there's a patch on SF (to cgitb) that does this.

Cheers,
mwh


I'm pretty sure this was integrated into 2.3; cgitb has a text function, at least.


Ah, OK. I recall some discussion about how the patch wasn't really
The Right Thing(tm), but noone had the time do The Right Thing(tm) and
whether it should just be checked in anyway but not the outcome.
Looks like it went in.

Cheers,
mwh

--
I also fondly recall Paris because that's where I learned to
debug Zetalisp while drunk. -- Olin Shivers
Jul 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.