[IPython-dev] autoload and making %pydb be more ipythonic (was: Extensions/pydb_ipy.py added)

Ville M. Vainio vivainio at gmail.com
Sun Nov 26 10:20:37 EST 2006


On 11/26/06, R. Bernstein <rocky at panix.com> wrote:

> What happens if I install pydb first and then install ipython? And as

Then you'll need to run "import ipy_pydb" once in ipython.

> for doing somehting ipython-wise inside a pydb import, you have the
> same issue as you brought up before: I may import pydb outside of
> ipython, and/or may not want it to get used automatically or every
> time inside ipython.

IPython.ipapi.get() returns None if you are not running in IPython.
This, and "except ImportError" can be done to safely determine whether
you should do ipython related stuff.

> For now, ipy_user_conf.py seems like right place to put an "import
> ipy_pydb" to indicate you want %pydb to work.

Exactly. And it will stay as the recommended place to load extensions.

-- 
Ville M. Vainio - vivainio.googlepages.com
blog=360.yahoo.com/villevainio - g[mail | talk]='vivainio'



More information about the IPython-dev mailing list