[IPython-dev] debugger.py refactoring

David Warde-Farley dwf@cs.toronto....
Thu Jul 8 19:27:04 CDT 2010


On 2010-07-08, at 7:52 PM, David Warde-Farley wrote:

> Hey folks,
> 
> I was just wondering (I didn't see a roadmap anywhere but then again I didn't look very hard) if a refactoring was planned for IPython/core/debugger.py, in particular to make it more extensible to third party tools.

Oops, debugger.py certainly isn't the place for this, and nor was it where I put it, but rather in iplib.py.

For the interested, here's my monkey-patch job:

        # use pydb if available
        if Debugger.has_pydb:
            from pydb import pm
        else:
            # try and use pudb
            try:
                import pudb
                pudb.post_mortem((sys.last_type,
                                  sys.last_value,
                                  sys.last_traceback))
                return
            except ImportError:
                pass
            # fallback to our internal debugger
            pm = lambda : self.InteractiveTB.debugger(force=True)
        self.history_saving_wrapper(pm)()

David


More information about the IPython-dev mailing list