[IPython-dev] ipython/pydb integeration - much progress, more still?

R. Bernstein rocky at panix.com
Fri Nov 3 06:41:38 EST 2006


Thanks for putting in the remaining patches for pydb integration!

One small debug "print" slipped into magic_pdef around line 672 of
Magic.py. (It was in my patch).

Some other remaining things.

I believe addressing the readline history problem obviates the need
for *all* of the Python version-checking in Debugger.py. In
particular, the code that starts this:

   # Ugly hack: for Python 2.3-2.4, we can't call the parent constructor,
   # because it binds readline and breaks tab-completion.  This means we
   # have to COPY the constructor here.

SVN checkin comments for this portion of the code are this: 
    fperez   - Cleanup [1786], which went in with unfinished stuff by accident
    fperez   - Apply Ville's patch, closes #87

As mentioned previously, readline gets imported on Python 2.5's pdb
unconditionally just as it does in 2.4, so I'm at a loss as to what
was changed in Python 2.5's pdb that "fixed" things. And again, given
the more general readline history fix, is this *still* needed?

I tried a little test on Python 2.4 and don't see a problem. But then
it's not clear to me from the above comments what the problem was or
how one would try to recreate the problem observed.

If this version testing is removed then pydb's post-mortem will work
on all versions of Python. 

Next, I wonder about the need for having to issue "import ipy_pydb".

Why not just uconditionally surround import via a "try/except" block?
If it fails, no problem, there won't be a %pydb magic.

Finally there's the problem of getting ipython's Pdb class used when
calling pydb.runl rather than pydb's Pdb class, so that the
ipython-specific changes get applied when calling via %pydb.

Again, thanks for moving forward on this.








More information about the IPython-dev mailing list