Code review comment for lp:~ipython-dev/ipython/set_trace

Revision history for this message
Brian Granger (ellisonbg) wrote :

> Thanks for the suggestion, this oneliner does exactly what I want:
>
> from IPython.Shell import IPShellEmbed; IPShellEmbed()()
>

Thanks for catching this Fernando. Until recently, I haven't been very
familiar with our embedding code.

> The only reason why I devised my line and then contributed a patch is that
> noone has either replied or suggested anything better so far, up until you.
>
> > already have tools for this, though I may well be missing something and
> would
> > be happy to reconsider.
>
> There is only one thing that I am still missing --- It's really annoying to
> always type:
>
> from IPython.Shell import IPShellEmbed; IPShellEmbed()()
>
> and it still annoying to type:
>
> import IPython; IPython.ipapi.set_trace()
>
> I would much prefer to just type:
>
> import IPython; IPython.embed()
>

What would that do? I

> I use this feature *very* often. Would you consider such a patch?
>

If it simplifies embedding, then yes, I think we would consider it. But, it
should go into Shell.py, which I have just refactored for the 0.11 release
(won't go into 0.10). Are you OK waiting for the 0.11 for this - it will be
much cleaner to implement then.

Cheers,

Brian

> Ondrej
> --
> https://code.edge.launchpad.net/~ipython-dev/ipython/set_trace/+merge/8855<https://code.edge.launchpad.net/%7Eipython-dev/ipython/set_trace/+merge/8855>
> You are subscribed to branch lp:ipython.
>

--
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
<email address hidden>
<email address hidden>

« Back to merge proposal