473,394 Members | 1,746 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

More verbose traceback

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
5 2177
"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
"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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Pascal | last post by:
Hello, I've a function like this: def myfunction(data, verbose = False): dothis... if verbose: print 'I do this' dothisother if verbose: print 'I do this other' ...
8
by: John Nagle | last post by:
I've been running M2Crypto successfully using Python 2.4 on Windows 2000, and now I'm trying to get it to work on Python 2.3.4 on Linux. Attempting to initialize a context results in Traceback...
84
by: braver | last post by:
Is there any trick to get rid of having to type the annoying, character-eating "self." prefix everywhere in a class? Sometimes I avoid OO just not to deal with its verbosity. In fact, I try to...
3
by: cokofreedom | last post by:
I've written up a little piece of code that isn't that foolproof to scan through a file (java presently) to find functions and then look for them throughout the document and output the name of the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.