More verbose traceback

  • Thread starter Thomas Guettler
  • Start date
T

Thomas Guettler

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
 
M

Michael Hudson

Thomas Guettler said:
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
 
C

Carmine Noviello

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
 
I

Irmen de Jong

Thomas said:
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.
 
J

Jeremy Fincher

Michael Hudson said:
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
 
M

Michael Hudson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,176
Messages
2,570,950
Members
47,503
Latest member
supremedee

Latest Threads

Top