[IPython-dev] IPython <-> PuDB integration

Robert Kern robert.kern at gmail.com
Fri Jul 10 11:36:09 EDT 2009

On 2009-07-10 09:25, Andreas Klöckner wrote:
> On Freitag 10 Juli 2009, Ville M. Vainio wrote:
>>> I hope this suggestion meets with your approval. :)
>> Actually, it doesn't even need approval, optimally, since you can ship
>> the ipython extension with PuDB. grep for expose_magic in source tree
>> how to create new magic commands. There is also pydb integration in
>> place already, it may give you some hints.
> I'm a bit lost here. I've looked at pydbgr's (pydb's successor project)
> IPython integration, here:
> http://is.gd/1tADH
> and its setup script, here:
> http://is.gd/1tAF3
> and I'm not sure I understand what's going on--especially where the IPython
> integration code gets installed to and how it gets found by IPython.

The user explicitly imports it in their ~/.ipython/ipy_user_conf.py . In 
ipy_pydbgr.py's case, I presume that Rocky intends us to manually copy that file 
into our ~/.ipython/ directories. I prefer to include these in the package 
itself so that it is always installed and ready for users to import.

> Also, "%debug??" results in
>      def magic_debug(self, parameter_s=''):
>          self.shell.debugger(force=True)
> which I couldn't quite trace any further.

self.shell is an InteractiveShell, defined in IPython/iplib.py . The guts are 
all in IPython/Debugger.py .

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the IPython-dev mailing list