Re: Get Only the Last Items in a Traceback

2007-11-09 Thread Gabriel Genellina
En Wed, 07 Nov 2007 01:53:31 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > This works great except for syntax errors. Any idea why your solution > doesn't catch those? > > Here's the output it gives me, followed by the code I'm using (running > in Python 2.5): > > Traceback (most rec

Re: Get Only the Last Items in a Traceback

2007-11-06 Thread [EMAIL PROTECTED]
On Sep 12, 10:35 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Am Wed, 12 Sep 2007 15:09:02 + schrieb [EMAIL PROTECTED]: > > > On Sep 12, 5:17 am, Peter Otten <[EMAIL PROTECTED]> wrote: > > >> Your assessment is wrong. You only get the extra lines in the traceback if > >> you don't immediately w

Re: Get Only the Last Items in a Traceback

2007-09-12 Thread [EMAIL PROTECTED]
On Sep 12, 11:35 am, Peter Otten <[EMAIL PROTECTED]> wrote: > Am Wed, 12 Sep 2007 15:09:02 + schrieb [EMAIL PROTECTED]: > > > > > On Sep 12, 5:17 am, Peter Otten <[EMAIL PROTECTED]> wrote: > > >> Your assessment is wrong. You only get the extra lines in the traceback if > >> you don't immediate

Re: Get Only the Last Items in a Traceback

2007-09-12 Thread Peter Otten
Am Wed, 12 Sep 2007 15:09:02 + schrieb [EMAIL PROTECTED]: > On Sep 12, 5:17 am, Peter Otten <[EMAIL PROTECTED]> wrote: >> >> Your assessment is wrong. You only get the extra lines in the traceback if >> you don't immediately wrap the exec statement in a try ... except block: >> $ cat snip_tra

Re: Get Only the Last Items in a Traceback

2007-09-12 Thread [EMAIL PROTECTED]
On Sep 12, 5:17 am, Peter Otten <[EMAIL PROTECTED]> wrote: > > Your assessment is wrong. You only get the extra lines in the traceback if > you don't immediately wrap the exec statement in a try ... except block: > > $ cat snip_traceback1.py > import traceback > > def alpha(): > try: >

Re: Get Only the Last Items in a Traceback

2007-09-12 Thread Peter Otten
Am Wed, 12 Sep 2007 11:21:48 +0200 schrieb Michael Ströder: > [EMAIL PROTECTED] wrote: >> I'm running code via the "exec in context" statement within a much >> larger program. What I would like to do is capture any possible >> errors and show a pretty traceback just like the Python interactive >>

Re: Get Only the Last Items in a Traceback

2007-09-12 Thread Michael Ströder
[EMAIL PROTECTED] wrote: > I'm running code via the "exec in context" statement within a much > larger program. What I would like to do is capture any possible > errors and show a pretty traceback just like the Python interactive > interpreter does, but only show the part of the traceback relating

Re: Get Only the Last Items in a Traceback

2007-09-12 Thread Peter Otten
Am Wed, 12 Sep 2007 02:09:28 + schrieb [EMAIL PROTECTED]: > I'm running code via the "exec in context" statement within a much > larger program. What I would like to do is capture any possible > errors and show a pretty traceback just like the Python interactive > interpreter does, but only s