<div dir="ltr">Does it embed with IPython.embed()?  That's probably what changed - IPython.embed properly using the instance method, which I know it didn't at some point.<div><br></div><div>The 'workaround' might be something like:</div>

<div><br></div><div>1. save the InteractiveShell instance</div><div>2. call ip.__class__.clear_instance()</div><div>3. proceed to embed</div><div>4. after embed, restore the instance (this will probably be the messiest bit)</div>

<div><br></div><div>I can look into allowing embed to be called without disrupting the singleton.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Jun 30, 2013 at 8:50 PM, Aaron Meurer <span dir="ltr"><<a href="mailto:asmeurer@gmail.com" target="_blank">asmeurer@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I bisected it to<br>
<br>
commit c5e77f946f77dd95ab086ea3e02802c4874c5e3d<br>
Author: MinRK <<a href="mailto:benjaminrk@gmail.com">benjaminrk@gmail.com</a>><br>
Date:   Fri Feb 8 21:41:19 2013 -0800<br>
<br>
    next release will be 1.0<br>
<br>
which means either I bisected it incorrectly (possible, since I was<br>
relying on python setup.py develop), or there is something in the<br>
version checking logic of PuDB.<br>
<br>
My use case is to add pudb.set_trace() to something in sympy and run<br>
isympy, which launches IPython. Then I press ! in PuDB to open IPython<br>
in the namespace of the function I am debugging.<br>
<span class="HOEnZb"><font color="#888888"><br>
Aaron Meurer<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sun, Jun 30, 2013 at 10:33 PM, MinRK <<a href="mailto:benjaminrk@gmail.com">benjaminrk@gmail.com</a>> wrote:<br>
> This shouldn't be something that has changed since 0.11. Are you seeing a<br>
> difference between 0.13 and master?<br>
><br>
> The workaround is to not use `instance` to create new instances of objects.<br>
> The result will be that methods asking for the global instance will retrieve<br>
> the original global instance, as opposed to the new one. I don't know if<br>
> this is acceptable or not.<br>
><br>
><br>
><br>
> On Sun, Jun 30, 2013 at 7:44 PM, Fernando Perez <<a href="mailto:fperez.net@gmail.com">fperez.net@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Mmh, I'm not sure there's one at this point. Min might know, the<br>
>> current enforcement of the single-instance rule is wired deep inside<br>
>> the config machinery.<br>
>><br>
>> On Sun, Jun 30, 2013 at 7:23 PM, Aaron Meurer <<a href="mailto:asmeurer@gmail.com">asmeurer@gmail.com</a>> wrote:<br>
>> > So what is the workaround for PuDB?<br>
>> ><br>
>> > Aaron Meurer<br>
>> ><br>
>> > On Sun, Jun 30, 2013 at 9:21 PM, Fernando Perez <<a href="mailto:fperez.net@gmail.com">fperez.net@gmail.com</a>><br>
>> > wrote:<br>
>> >> Indeed, way back when IPython made blunt assumptions about being more<br>
>> >> or less in control of the user session, and created lots of global<br>
>> >> state. That made sense when it was only an interactive user shell, but<br>
>> >> now that it's a service to manage namespaces, its core should be much<br>
>> >> more constrained in how it pollutes global structures.<br>
>> >><br>
>> >> Unfortunately as Thomas said, cleaning this up takes time and isn't at<br>
>> >> the top of the priority list.<br>
>> >><br>
>> >> Cheers,<br>
>> >><br>
>> >> f<br>
>> >><br>
>> >> On Sun, Jun 30, 2013 at 8:31 AM, Thomas Kluyver <<a href="mailto:takowl@gmail.com">takowl@gmail.com</a>><br>
>> >> wrote:<br>
>> >>> Various parts of the IPython machinery assume that there's only one<br>
>> >>> instance<br>
>> >>> in a given process, and would break with multiple IPython shells in a<br>
>> >>> single<br>
>> >>> process. We're slowly moving away from that, but it's not high<br>
>> >>> priority for<br>
>> >>> us.<br>
>> >>><br>
>> >>> Thomas<br>
>> >>><br>
>> >>><br>
>> >>> On 30 June 2013 05:52, Aaron Meurer <<a href="mailto:asmeurer@gmail.com">asmeurer@gmail.com</a>> wrote:<br>
>> >>>><br>
>> >>>> In IPython dev, if you try to start an IPython instance from within<br>
>> >>>> an<br>
>> >>>> IPython instance, it raises MultipleInstanceError. What is the<br>
>> >>>> purpose<br>
>> >>>> of this? It breaks a use-case of mine, which is to start PuDB from<br>
>> >>>> within IPython, then to open the IPython interpreter from within PuDB<br>
>> >>>> while debugging?  Is the new way to do things to somehow reattach to<br>
>> >>>> the same IPython instance?<br>
>> >>>><br>
>> >>>> I've CCd the PuDB list.<br>
>> >>>><br>
>> >>>> Aaron Meurer<br>
>> >>>> _______________________________________________<br>
>> >>>> IPython-dev mailing list<br>
>> >>>> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> >>>> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>> _______________________________________________<br>
>> >>> IPython-dev mailing list<br>
>> >>> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> >>> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
>> >>><br>
>> >><br>
>> >><br>
>> >><br>
>> >> --<br>
>> >> Fernando Perez (@fperez_org; <a href="http://fperez.org" target="_blank">http://fperez.org</a>)<br>
>> >> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)<br>
>> >> fernando.perez-at-berkeley: contact me here for any direct mail<br>
>> >> _______________________________________________<br>
>> >> IPython-dev mailing list<br>
>> >> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> >> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
>> > _______________________________________________<br>
>> > IPython-dev mailing list<br>
>> > <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> > <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
>><br>
>><br>
>><br>
>> --<br>
>> Fernando Perez (@fperez_org; <a href="http://fperez.org" target="_blank">http://fperez.org</a>)<br>
>> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!)<br>
>> fernando.perez-at-berkeley: contact me here for any direct mail<br>
>> _______________________________________________<br>
>> IPython-dev mailing list<br>
>> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
>> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
><br>
><br>
> _______________________________________________<br>
> IPython-dev mailing list<br>
> <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
><br>
_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
</div></div></blockquote></div><br></div>