Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder2.hal-mli.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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; 'context': 0.05; 'paths': 0.05; 'item.': 0.07; 'referring': 0.07; 'missed': 0.09; 'scripts': 0.09; 'python': 0.09; 'ide': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'terry': 0.09; 'subject:error': 0.11; 'library': 0.15; 'devs': 0.16; 'doubleclick': 0.16; 'iterating': 0.16; 'lineno': 0.16; 'objection': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'reedy': 0.16; 'subject:too': 0.16; 'wrote:': 0.17; 'instance': 0.17; 'mechanism': 0.17; 'jan': 0.18; 'parse': 0.22; 'wednesday,': 0.22; 'specified': 0.23; 'command': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'common': 0.26; 'am,': 0.27; 'done.': 0.27; 'question': 0.27; 'disk': 0.27; 'is?': 0.27; 'header:X-Complaints- To:1': 0.28; 'noticed': 0.28; 'post': 0.28; 'that.': 0.30; 'window': 0.30; 'file': 0.32; 'johnson': 0.32; 'could': 0.32; 'adjust': 0.33; 'idle': 0.33; 'traceback': 0.33; 'problem': 0.33; 'to:addr:python-list': 0.33; 'agree': 0.34; 'text': 0.34; 'thanks': 0.34; 'consistent': 0.35; 'path': 0.35; 'open': 0.35; 'something': 0.35; 'received:org': 0.36; 'really': 0.36; 'modules': 0.36; 'should': 0.36; 'too': 0.36; 'editor': 0.37; 'does': 0.37; 'item': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'comment': 0.38; 'some': 0.38; 'to:addr:python.org': 0.39; 'build': 0.39; 'called': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'your': 0.60; 'places': 0.61; 'leaving': 0.62; 'personal': 0.62; 'color': 0.69; 'special': 0.73; '2013': 0.84; 'applicable.': 0.84; 'complaint': 0.84; 'received:fios.verizon.net': 0.84; 'red.': 0.84; 'alone.': 0.91; 'rick': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Terry Reedy Subject: Re: PyWart: Exception error paths far too verbose Date: Wed, 16 Jan 2013 19:51:31 -0500 References: <85ec4ecd-4d28-4c3e-980f-d7668e059eed@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: pool-173-75-251-66.phlapa.fios.verizon.net User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <85ec4ecd-4d28-4c3e-980f-d7668e059eed@googlegroups.com> 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: , Newsgroups: comp.lang.python Message-ID: Lines: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358383925 news.xs4all.nl 6944 [2001:888:2000:d::a6]:40414 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36924 On 1/16/2013 11:43 AM, Rick Johnson wrote: > 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? I missed in your original post that you only want one consistent personal library path abbreviated, leaving everything else alone. So the above is not applicable. And a custom excepthook very easy. How should the traceback mechanism will know what that path is? To answer the objection about having to search the whole disk when on a 'foreign' machine, the top line of the traceback could be Traceback: ... = C:/users/me/pystuff >> 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)... I never noticed that. Thanks for the exchange of information. -- Terry Jan Reedy