[IPython-dev] RFC: IPython.ipapi for "public" ipython API.

Ville Vainio vivainio at gmail.com
Fri Jan 13 14:31:59 EST 2006

On 1/13/06, Fernando Perez <Fernando.Perez at colorado.edu> wrote:

> There are a few things to note though:
> - I don't think this can be done as a module: what ipython would those
> functions talk to?  Remember, in an embedded ipython situation, there can be

The answer is "it doesn't matter for now". Therefore I suggested

import IPython.ipapi as ip

At later date "ip" may be an instance of another kind of object. I
guess we could in Ipython.ipapi.instance() to acquire an instance of
ipython api for a good measure right now, even if it only returned the
module itself in the first phase.

I figure that modules that use ipapi are imported ("installed") from
already running ipython, therefore they only have access to the
resources of that ipython instance.

> Embedded ipython does have its users (myself, for example :), so we need to be
> careful about how this is implemented.

Should not be a problem if the situation is as above.

> - Let's make sure that users are aware that some of this may change in the
> chainsaw branch to some extent.  We should try to make decent decisions now,

Yes, it's "for your convenience only, though we hope to keep it as
stable as possible. Use at your own risk".

When the chainsaw:ing is done, old ipapi can be a wrapper over the new
ipapi, so the breakage can be avoided (to the extent that it matters,
considering the documented api break in 1.0).

> so the same code and API can carry forward to the new ipython, but in the new
> branch clean design will win over backwards compatibility.  In the current
> branch, the priorities are inverted: any changes made in trunk/ should be
> minimally disruptive to current users.

The disruption to current users is of course zero - it's a new module
that only wraps old functionality in a more friendly and "contained"

I think we should be "agile" and do the simple thing at this point,
most of the work is very easy. We would of course not advertise the
new module until we are satisfied with it.

At this point I'd like to create the module and expose TryNextHook
exception - Walter's gonna need it with the displayhook stuff. :-)

Ville Vainio    http://tinyurl.com/2prnb
  Can't you see the world is burning
  Can't you feel its Fire burning
  Don't you know we all are burning
  The Fire of Life       -- R.N.Taylor / Changes

More information about the IPython-dev mailing list