[IPython-user] Idioms for using custom profiles
Ville M. Vainio
vivainio@gmail....
Sun Sep 14 13:17:08 CDT 2008
On Sun, Sep 14, 2008 at 8:24 PM, Matthew Turk <matthewturk@gmail.com> wrote:
> That sounds fair, and of course I will defer to your judgment. Plus,
> it seems to be easier that way, as we can wrap all of the
> initialization code into a single script that gets installed into
> $LOCAL/bin/ . So, to that end, something like the following seems to
> be the best way to proceed -- have I made any obvious mistakes?
I'd still create a normal extension in any case, and install it as
top-level python module in your package's setup.py. That way, your
customizations can benefit anyone that wants to get them, regardless
of how you launch ipython (i.e. you can launch ipython normally with
just -pylab, and in mid-session you decide you want to use the
magics/whatever provided by the extension). You can still create the
launcher if you want, but it will be a lot simpler. You just import
your extension at some point, and get the ip object by
IPython.ipapi.get().
You could also implement a launcher that does:
ipython -pylab -i -c "import ipy_yt"
This will load the extension ipy_yt at startup.
--
Ville M. Vainio
http://tinyurl.com/vainio
More information about the IPython-user
mailing list