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


Groups > comp.lang.python > #7178

Re: Function call arguments in stack trace?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <ian.g.kelly@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'arguments': 0.05; 'raised.': 0.09; 'subject:Function': 0.09; 'pm,': 0.10; 'exception': 0.12; 'debugging': 0.14; 'wrote:': 0.14; 'exceptions.': 0.16; 'extracting': 0.16; 'frames': 0.16; 'trace.': 0.16; 'unhandled': 0.16; 'stack': 0.16; 'cc:addr:python-list': 0.17; 'tue,': 0.17; 'simpler': 0.19; 'trace': 0.19; 'header:In- Reply-To:1': 0.21; 'cc:2**0': 0.22; 'cc:no real name:2**0': 0.23; "they've": 0.23; 'received:209.85.161.46': 0.23; 'received:mail- fx0-f46.google.com': 0.23; "doesn't": 0.25; 'received:209.85.161': 0.26; 'message-id:@mail.gmail.com': 0.28; 'thanks': 0.28; 'subject:?': 0.29; 'cc:addr:python.org': 0.30; 'tool.': 0.30; 'received:google.com': 0.37; 'received:209.85': 0.37; 'could': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'received:209': 0.39; 'getting': 0.40; 'custom': 0.60; 'generate': 0.60; 'your': 0.60; 'locals': 0.84; 'traceback,': 0.84; 'subject:call': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=IraYWrRqMVrXDpN4cq5JqD+tBw0W5ML1dKCooaZ3id0=; b=DIgo7eYuePh+7PkIJq+z0sFYjJjvVwBPf7MdMB74jub3f8mLgknvd/Wz9Ywr/yPJrD p52Di5O7N6CKLWz/O89Yxwv1ExE4hyITmoD2+f82KT1uESy/lfk7alZxbBS4ezy1hdql /kMiiNqXJ2NC+Oe+f4h9W7Rv0MsB+OJZoLGMg=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=TqkEXr0HpV9RcJNiIf3RKK+IXtcQ1o9EC8rIlvperAeX+23G5ez2pw2yDUNDrYYfY8 lUdq1Jw0fUtjWqbgBLH1bvj0qjTed0NvNxQRV/2XNJtCh57OhPBuaKfxSq/xoCxeGL4m 2PdelBzAL36pHqjWbq3E1/kau3e2/MElhEvqU=
MIME-Version 1.0
In-Reply-To <6c3c9ab9-7880-4988-8258-8f8b2d4d7f72@m21g2000yqc.googlegroups.com>
References <9d344c45-8017-4c80-9a17-bc7accd81047@l26g2000yqm.googlegroups.com> <9578lmFl76U1@mid.individual.net> <6c3c9ab9-7880-4988-8258-8f8b2d4d7f72@m21g2000yqc.googlegroups.com>
From Ian Kelly <ian.g.kelly@gmail.com>
Date Tue, 7 Jun 2011 13:52:30 -0600
Subject Re: Function call arguments in stack trace?
To Dun Peal <dunpealer@gmail.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.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2541.1307476383.9059.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 82.94.164.166
X-Trace 1307476383 news.xs4all.nl 49179 [::ffff:82.94.164.166]:43126
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:7178

Show key headers only | View raw


On Tue, Jun 7, 2011 at 1:31 PM, Dun Peal <dunpealer@gmail.com> wrote:
> On Jun 7, 1:23 pm, Neil Cerutti <ne...@norwich.edu> wrote:
>> Use pdb.
>
> Neil, thanks for the tip; `pdb` is indeed a great debugging tool.
>
> Still, it doesn't obviate the need for arguments in the stack trace.

Your program could use sys.excepthook to generate a custom stack trace
for unhandled exceptions.  All the stack frames are available from the
traceback, but extracting the arguments would be tricky, and getting
the original arguments would be impossible if they've been reassigned
prior to the exception being raised.  It would be simpler just to dump
all the locals in the frame.

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


Thread

Function call arguments in stack trace? Dun Peal <dunpealer@gmail.com> - 2011-06-07 11:09 -0700
  Re: Function call arguments in stack trace? Neil Cerutti <neilc@norwich.edu> - 2011-06-07 18:23 +0000
    Re: Function call arguments in stack trace? Dun Peal <dunpealer@gmail.com> - 2011-06-07 12:31 -0700
      Re: Function call arguments in stack trace? Ian Kelly <ian.g.kelly@gmail.com> - 2011-06-07 13:52 -0600
      Re: Function call arguments in stack trace? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2011-06-07 22:01 +0200
      Re: Function call arguments in stack trace? Neil Cerutti <neilc@norwich.edu> - 2011-06-07 20:29 +0000
  Re: Function call arguments in stack trace? "Gabriel Genellina" <gagsl-py2@yahoo.com.ar> - 2011-06-07 23:45 -0300

csiph-web