> On Tue, Jul 28, 2009 at 3:12 AM, Fernando Perez<email address hidden> wrote:
>
> >> import IPython; IPython.embed()
> >
> > Yes, I'm also OK with having a simplified embed() be part of the
> > top-level public API. But it should at least take a few arguments.
>
> IPython.ipapi is the top level public api, not IPython. Starting to
> shove stuff to IPython package namespace is messy, and the line should
> be drawn somewhere.
>
> If the aim is to reduce typing, provide a root level module that gives
Yes, the aim is to reduce typing (e.g. I was using IPython.ipapi.set_trace() and it's quite pain. IPython.embed() is way better).
> you access to stuff in IPython package (import ipy; ipy.embed() )
Do you mean to provide the root level module in IPython, or in all my other programs?
The way I see it is to put one line into IPython/__init__.py
from Shell import embed
(or something similar). I don't think it's messy --- it's something that users will call frequently.
> On Tue, Jul 28, 2009 at 3:12 AM, Fernando Perez<email address hidden> wrote:
>
> >> import IPython; IPython.embed()
> >
> > Yes, I'm also OK with having a simplified embed() be part of the
> > top-level public API. But it should at least take a few arguments.
>
> IPython.ipapi is the top level public api, not IPython. Starting to
> shove stuff to IPython package namespace is messy, and the line should
> be drawn somewhere.
>
> If the aim is to reduce typing, provide a root level module that gives
Yes, the aim is to reduce typing (e.g. I was using IPython. ipapi.set_ trace() and it's quite pain. IPython.embed() is way better).
> you access to stuff in IPython package (import ipy; ipy.embed() )
Do you mean to provide the root level module in IPython, or in all my other programs?
The way I see it is to put one line into IPython/__init__.py
from Shell import embed
(or something similar). I don't think it's messy --- it's something that users will call frequently.
Ondrej