This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ppperry
Recipients kbk, ppperry, roger.serwy, terry.reedy
Date 2015-06-06.23:29:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1433633361.17.0.276021786241.issue24252@psf.upfronthosting.co.za>
In-reply-to
Content
Is there any reason why the end of the traceback, rather then just the beginning, needs to be pruned in the first place?

Additionally, the "search for pdb in the tb" method will still undesirably prune the traceback if someone invents there own buggy debugger that subclasses from bdb.Bdb.

Would this cleanup function work?
def cleanup_traceback(tb):
    idle_directory = os.path.dirname(__file__)
    while os.path.dirname(tb[0][0]) == idle_directory:
        del tb[0]
    [rest of code not having to do with pruning tracebacks]
The only situation that this function would behave wrongly is when someone launches IDLE from the shell (Why would they do that?)
History
Date User Action Args
2015-06-06 23:29:21ppperrysetrecipients: + ppperry, terry.reedy, kbk, roger.serwy
2015-06-06 23:29:21ppperrysetmessageid: <1433633361.17.0.276021786241.issue24252@psf.upfronthosting.co.za>
2015-06-06 23:29:21ppperrylinkissue24252 messages
2015-06-06 23:29:20ppperrycreate