[IPython-user] Idioms for using custom profiles

Ville M. Vainio vivainio@gmail....
Mon Sep 15 14:21:06 CDT 2008

On Mon, Sep 15, 2008 at 10:01 PM, Matthew Turk <matthewturk@gmail.com> wrote:

> (ipy_yt.py installed somewhere in PYTHONPATH)
> --
> import IPython.ipapi
> import yt.ipython_profile
> yt.ipython_profile.setup_commands(IPython.ipapi.getapi())
> --

That's something you *can* do, but nor really the "standard" way of
doing an extension. Notably, you don't need setup_commands, since you
can just get the api object in ipy_yt.py by doing

ip = IPython.ipapi.get

(this will be None if ipython is not running)

Ville M. Vainio

More information about the IPython-user mailing list