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


Groups > comp.lang.python > #36907

Re: PyWart: Exception error paths far too verbose

Newsgroups comp.lang.python
Date 2013-01-16 08:43 -0800
References <e887a93f-ea32-442c-9673-4da892b9f37e@googlegroups.com> <mailman.565.1358330072.2939.python-list@python.org>
Subject Re: PyWart: Exception error paths far too verbose
From Rick Johnson <rantingrickjohnson@gmail.com>
Message-ID <mailman.577.1358355349.2939.python-list@python.org> (permalink)

Show all headers | View raw


On Wednesday, January 16, 2013 3:53:55 AM UTC-6, Terry Reedy wrote:

> I agree with the complaint and you may have the germ of a good idea. The 
> problem is that for some tracebacks, paths jump all over the place 
> rather than having a common prefix. Dealing with this might require 
> preprocessing the entire traceback before iterating and printing each item.

Your comment is too ambiguous for me to comprehend... Are you referring to the case where devs keep python modules and scripts in /many/ places on their disc, or something else?

> Are you are aware of
> '''
> sys.excepthook(type, value, traceback)
> 
>      This function prints out a given traceback and exception to sys.stderr.
> 
> [...]
>
> This is how some apps and environments customize exception reporting 
> (and logging). I believe some people also put a replacement in their 
> site module.


I'll check it out. If the path can be trimmed there, then the problem is solved for me, but what about everyone else?

> What you want to change is format_tb_item (possibly, as I said, after 
> scanning traceback before the print loop). If you come up with something 
> nice, I would like to see it.

If i do i will post it. First i need to respond to someone who always needs me to explain every detail because he has trouble comprehending even the simplest of ideas. *cough*even*cough*prano

> The only thing special that IDLE does now is to color the text red. I 
> should sometime see how that is done. (Being able to doubleclick on an 
> item and have IDLE open an edit window at the specified line would be 
> really nice!)

IDLE already has a build in command from the context menu called "go to file/line" that will parse any right-clicked line for file paths and line numbers, then, open that file in a new IDLE editor instance and adjust the view so you can see the lineno in question (typical IDE stuff)... but most devs prefer to use IDEs with less bugs asinine interfaces :-)

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


Thread

PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-15 21:59 -0800
  PyWart: Exception error paths far too verbose donarb <donarb@nwlink.com> - 2013-01-16 00:31 -0800
    Re: PyWart: Exception error paths far too verbose Chris Angelico <rosuav@gmail.com> - 2013-01-16 19:39 +1100
  Re: PyWart: Exception error paths far too verbose Terry Reedy <tjreedy@udel.edu> - 2013-01-16 04:53 -0500
    Re: PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-16 08:43 -0800
      Re: PyWart: Exception error paths far too verbose Terry Reedy <tjreedy@udel.edu> - 2013-01-16 19:51 -0500
        Re: PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-18 16:34 -0800
        Re: PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-18 16:34 -0800
    Re: PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-16 08:43 -0800
    Re: PyWart: Exception error paths far too verbose Ramchandra Apte <maniandram01@gmail.com> - 2013-01-19 19:15 -0800
      Re: PyWart: Exception error paths far too verbose Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-20 06:08 +0000
        Re: PyWart: Exception error paths far too verbose Terry Reedy <tjreedy@udel.edu> - 2013-01-20 11:08 -0500
  Re: PyWart: Exception error paths far too verbose Michael Torrie <torriem@gmail.com> - 2013-01-16 07:20 -0700
    Re: PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-16 08:31 -0800
    Re: PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-16 08:31 -0800
  Re: PyWart: Exception error paths far too verbose Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-16 14:45 +0000
    Re: PyWart: Exception error paths far too verbose Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-16 09:32 -0800
      Re: PyWart: Exception error paths far too verbose Chris Angelico <rosuav@gmail.com> - 2013-01-17 08:21 +1100
      Re: PyWart: Exception error paths far too verbose alex23 <wuwei23@gmail.com> - 2013-01-16 16:33 -0800

csiph-web