Re: [Python-Dev] Improved Traceback Module

2010-02-01 Thread Benjamin Schweizer
On Fri, Jan 29, 2010 at 08:02:58PM -0500, P.J. Eby wrote: At 01:24 AM 1/30/2010 +0100, Ludvig Ericson wrote: On 28 jan 2010, at 22:47, P.J. Eby wrote: At 07:47 PM 1/28/2010 +0100, Benjamin Schweizer wrote: I like the idea of configuring the list of variables with using a convention

Re: [Python-Dev] Improved Traceback Module

2010-01-29 Thread P.J. Eby
At 01:24 AM 1/30/2010 +0100, Ludvig Ericson wrote: On 28 jan 2010, at 22:47, P.J. Eby wrote: At 07:47 PM 1/28/2010 +0100, Benjamin Schweizer wrote: I like the idea of configuring the list of variables with using a convention like __trace__, though this requires me to specify what

[Python-Dev] Improved Traceback Module

2010-01-28 Thread Benjamin Schweizer
Hello, I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here: http://benjamin-schweizer.de/improved-python-traceback-module.html and the source code

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Facundo Batista
On Thu, Jan 28, 2010 at 10:33 AM, Benjamin Schweizer we...@benjamin-schweizer.de wrote: I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here: This is

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Maciej Fijalkowski
On Thu, Jan 28, 2010 at 2:33 PM, Benjamin Schweizer we...@benjamin-schweizer.de wrote: Hello, I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here:  

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Antoine Pitrou
Le Thu, 28 Jan 2010 14:33:11 +0100, Benjamin Schweizer a écrit : I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here: As Facundo said it shouldn't

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Barry Warsaw
On Jan 28, 2010, at 8:33 AM, Benjamin Schweizer wrote: I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here:

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Fred Drake
The traceback support from the zc.twist package might be interesting as well; not sure how well that's isolated from the rest of the package though: http://pypi.python.org/pypi/zc.twist/ -Fred -- Fred L. Drake, Jr.fdrake at gmail.com Chaos is the score upon which reality is written.

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Kristján Valur Jónsson
:15 To: python-dev@python.org Subject: Re: [Python-Dev] Improved Traceback Module Le Thu, 28 Jan 2010 14:33:11 +0100, Benjamin Schweizer a écrit : I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Guido van Rossum
On Thu, Jan 28, 2010 at 5:33 AM, Benjamin Schweizer we...@benjamin-schweizer.de wrote: I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here:  

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Benjamin Schweizer
Hello Facuno, I would love to get tracebacks with all variables in all levels of the stack. However, this may be too much information for standard tracebacks, so what do you think to enable it on demand? Like setting a flag or importing a module at the beginning of the file? I've added an

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Benjamin Schweizer
Hi Kristján, I have a traceback2.py module with the same api as traceback. Displaying local variables is optional through keyword arguments. I was also able to refactor the original significantly, making it much clearer. traceback2.py was my first attempt; but I finally came out with a

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Benjamin Schweizer
Hi Guido, On Thu, Jan 28, 2010 at 5:02 PM, Guido van Rossum gu...@python.org wrote: On Thu, Jan 28, 2010 at 5:33 AM, Benjamin Schweizer we...@benjamin-schweizer.de wrote: I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread P.J. Eby
At 02:33 PM 1/28/2010 +0100, Benjamin Schweizer wrote: Hello, I've updated the traceback.py module; my improved version dumps all local variabes from the stack trace, which helps in debugging rare problems. You can find details in my latest blog post here:

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread A.M. Kuchling
cgitb can also produce text tracebacks: import cgitb cgitb.enable(format='text') import urllib f=urllib.urlopen('bogus://foo') type 'exceptions.IOError' Python 2.7a1+: /home/amk/source/p/python/python Thu Jan 28 11:35:04 2010 A problem occurred in a Python script. Here is the sequence of

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Ian Bicking
On Thu, Jan 28, 2010 at 11:01 AM, s...@pobox.com wrote: pje If you look for a local variable in each frame containing a format pje string, let's say __trace__, you could apply that format string to pje a locals+globals dictionary for the frame, in place of dumping all pje the

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread P.J. Eby
At 11:01 AM 1/28/2010 -0600, s...@pobox.com wrote: pje If you look for a local variable in each frame containing a format pje string, let's say __trace__, you could apply that format string to pje a locals+globals dictionary for the frame, in place of dumping all pje the locals

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Benjamin Schweizer
Hello pje, On Thu, Jan 28, 2010 at 12:43:13PM -0500, P.J. Eby wrote: At 11:01 AM 1/28/2010 -0600, s...@pobox.com wrote: pje If you look for a local variable in each frame containing a format pje string, let's say __trace__, you could apply that format string to pje a

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Kristján Valur Jónsson
] On Behalf Of Benjamin Schweizer Sent: 28. janúar 2010 16:03 To: Kristján Valur Jónsson Cc: Antoine Pitrou; python-dev@python.org Subject: Re: [Python-Dev] Improved Traceback Module Hi Kristján, I have a traceback2.py module with the same api as traceback. Displaying local variables is optional

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread P.J. Eby
At 07:47 PM 1/28/2010 +0100, Benjamin Schweizer wrote: Hello pje, On Thu, Jan 28, 2010 at 12:43:13PM -0500, P.J. Eby wrote: At 11:01 AM 1/28/2010 -0600, s...@pobox.com wrote: pje If you look for a local variable in each frame containing a format pje string, let's say __trace__, you

Re: [Python-Dev] Improved Traceback Module

2010-01-28 Thread Kristján Valur Jónsson
-Original Message- From: python-dev-bounces+kristjan=ccpgames@python.org [mailto:python-dev-bounces+kristjan=ccpgames@python.org] On Behalf Of Guido van Rossum This is a nice idea, but to be 100% robust is very hard. I assume you've already added something to clip large