Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '16,': 0.03; 'exception': 0.03; 'value,': 0.03; 'context': 0.05; 'paths': 0.05; 'item.': 0.07; 'referring': 0.07; 'scripts': 0.09; 'python': 0.09; "'''": 0.09; 'ide': 0.09; 'terry': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:error': 0.11; ':-)': 0.13; 'interfaces': 0.15; 'devs': 0.16; 'doubleclick': 0.16; 'ides': 0.16; 'iterating': 0.16; 'lineno': 0.16; 'reedy': 0.16; 'simplest': 0.16; 'subject:too': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'environments': 0.22; 'parse': 0.22; 'wednesday,': 0.22; 'cc:2**0': 0.23; 'apps': 0.23; 'specified': 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'common': 0.26; 'bugs': 0.27; 'done.': 0.27; 'question': 0.27; 'module.': 0.27; 'trouble': 0.28; 'post': 0.28; 'prints': 0.29; 'reporting': 0.29; 'window': 0.30; 'function': 0.30; '(and': 0.32; 'file': 0.32; 'print': 0.32; 'adjust': 0.33; 'idle': 0.33; 'traceback': 0.33; 'problem': 0.33; 'everyone': 0.33; 'agree': 0.34; 'received:google.com': 0.34; 'text': 0.34; 'path': 0.35; 'said,': 0.35; 'skip:* 20': 0.35; 'open': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'something': 0.35; 'really': 0.36; 'explain': 0.36; 'but': 0.36; 'modules': 0.36; "i'll": 0.36; 'should': 0.36; 'too': 0.36; 'editor': 0.37; 'does': 0.37; 'detail': 0.37; 'item': 0.37; 'rather': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'some': 0.38; 'there,': 0.38; 'build': 0.39; 'called': 0.39; 'where': 0.40; 'your': 0.60; 'most': 0.61; 'places': 0.61; 'first': 0.61; 'believe': 0.69; 'color': 0.69; 'special': 0.73; '2013': 0.84; 'complaint': 0.84; 'nice,': 0.84; 'red.': 0.84; 'ideas.': 0.91; 'received:209.85.220.184': 0.91 X-Received: by 10.49.58.238 with SMTP id u14mr435587qeq.13.1358354609317; Wed, 16 Jan 2013 08:43:29 -0800 (PST) Newsgroups: comp.lang.python Date: Wed, 16 Jan 2013 08:43:29 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=70.196.117.92; posting-account=h3aEwQoAAACiuqX-oR3gvCVFm8lLHoWj References: User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 70.196.117.92 MIME-Version: 1.0 Subject: Re: PyWart: Exception error paths far too verbose From: Rick Johnson To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 49 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358355349 news.xs4all.nl 6919 [2001:888:2000:d::a6]:38282 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36907 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= =20 > problem is that for some tracebacks, paths jump all over the place=20 > rather than having a common prefix. Dealing with this might require=20 > preprocessing the entire traceback before iterating and printing each ite= m. 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 the= ir disc, or something else? > Are you are aware of > ''' > sys.excepthook(type, value, traceback) >=20 > This function prints out a given traceback and exception to sys.stde= rr. >=20 > [...] > > This is how some apps and environments customize exception reporting=20 > (and logging). I believe some people also put a replacement in their=20 > site module. I'll check it out. If the path can be trimmed there, then the problem is so= lved for me, but what about everyone else? > What you want to change is format_tb_item (possibly, as I said, after=20 > scanning traceback before the print loop). If you come up with something= =20 > 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 s= implest of ideas. *cough*even*cough*prano > The only thing special that IDLE does now is to color the text red. I=20 > should sometime see how that is done. (Being able to doubleclick on an=20 > item and have IDLE open an edit window at the specified line would be=20 > really nice!) IDLE already has a build in command from the context menu called "go to fil= e/line" that will parse any right-clicked line for file paths and line numb= ers, 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 :-)