hi pierre<br><br>i believe this was a bug that was fixed: <br><<a href="https://github.com/ipython/ipython/pull/687">https://github.com/ipython/ipython/pull/687</a>><br><br>are you updated to the latest commit?<br><br>
neil<br><br><br><div class="gmail_quote">On Thu, Aug 11, 2011 at 4:28 PM, Pierre Raybaut <span dir="ltr"><<a href="mailto:pierre.raybaut@gmail.com">pierre.raybaut@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 confirm that when starting a kernel with IPKernelApp, I always get a<br>
"hb" port = 0. which is a problem when trying to connect a frontend to<br>
it:<br>
<br>
Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit<br>
(Intel)] on win32<br>
Type "help", "copyright", "credits" or "license" for more information.<br>
>>> from IPython.zmq.ipkernel import IPKernelApp<br>
>>> kernel = IPKernelApp()<br>
>>> kernel.initialize(['python', '--pylab=qt'])<br>
[IPKernelApp] To connect another client to this kernel, use:<br>
[IPKernelApp] --existing --shell=54717 --iopub=56526 --stdin=53981 --hb=0<br>
>>><br>
<br>
Any idea?<br>
<br>
Thx<br>
Pierre<br>
<br>
2011/8/10 Pierre Raybaut <<a href="mailto:pierre.raybaut@gmail.com">pierre.raybaut@gmail.com</a>>:<br>
> Hi Fernando,<br>
><br>
> I'm in the middle of my vacations but I heard of the v0.11 release so<br>
> I couldn't resist to test some things and begin to think about the<br>
> future of IPython integration in Spyder.<br>
><br>
> First of all, congratulations to the IPython dev team for this<br>
> impressive new release. Some details (like the excellent documentation<br>
> or the great-looking website) show that a lot of work has been done<br>
> and you should be proud of the result. I'm really excited to<br>
> contribute to the promotion of IPython through Spyder!<br>
><br>
> A lot of things were broken in Spyder with this new release of IPython:<br>
> <a href="http://spyder-ide.blogspot.com/2011/08/ipython-has-taken-huge-step-forward.html" target="_blank">http://spyder-ide.blogspot.com/2011/08/ipython-has-taken-huge-step-forward.html</a><br>
> The essential part has already been taken care of (especially on<br>
> non-Windows platforms, everything is almost back to normal).<br>
><br>
> For the future, I'm thinking of a new dedicated Spyder plugin, the<br>
> IPython plugin, which would be based on IPython v0.11's Qt console. I<br>
> hope that, in time, you will be able to cite this application of<br>
> IPython Qt console as an example...<br>
> As I mentioned on my blog, the critical part should be the variable<br>
> explorer support -- currently, Spyder is already using a two-process<br>
> architecture with sockets communicating things for code introspection<br>
> (code completion, calltips, ...) and for the variable explorer<br>
> management (getting namespace contents, getting/sending variables<br>
> contents, and so on).<br>
><br>
> However, being in the middle of my vacations, I won't be very<br>
> efficient for coding new things, at least in the next two weeks. So I<br>
> won't bother you with all my naive technical questions right now.<br>
><br>
> Anyway, a Spyder user mentioned this post of yours and so I tried to<br>
> run the 'ipkernel_qtapp.py' on my Windows machine, and it crashes when<br>
> I click on the "Qt console" button. Apparently, the embedded IPython<br>
> kernel is started with bad parameters and I don't know why exactly<br>
> (the 'hb' port is 0, which is the cause of the crash when trying to<br>
> run a Qt Console with these parameters):<br>
> [IPKernelApp] To connect another client to this kernel, use:<br>
> [IPKernelApp] --existing --shell=57119 --iopub=61366 --stdin=55688 --hb=0<br>
><br>
> Thanks,<br>
> Pierre<br>
><br>
> 2011/8/5 <<a href="mailto:ipython-user-request@scipy.org">ipython-user-request@scipy.org</a>>:<br>
>> Date: Fri, 5 Aug 2011 00:20:02 -0700<br>
>> From: Fernando Perez <<a href="mailto:fperez.net@gmail.com">fperez.net@gmail.com</a>><br>
>> Subject: [IPython-User] Putting a kernel inside a GUI (WX or Qt)<br>
>> application so you can run external Qt consoles against it.<br>
>> To: IPython User list <<a href="mailto:ipython-user@scipy.org">ipython-user@scipy.org</a>><br>
>> Message-ID:<br>
>> <<a href="mailto:CAHAreOrs2N8QWhw7N75HbxPrLisEYwY-egEPKajuzmYuVXSmQQ@mail.gmail.com">CAHAreOrs2N8QWhw7N75HbxPrLisEYwY-egEPKajuzmYuVXSmQQ@mail.gmail.com</a>><br>
>> Content-Type: text/plain; charset=ISO-8859-1<br>
>><br>
>> Hi all,<br>
>><br>
>> [ forgot to CC the user list, where people who aren't on the dev list<br>
>> may care about this... ]<br>
>><br>
>> we knew this was in principle possible given the new architecture, but<br>
>> in working with a colleague today I had to actually implement it, so<br>
>> I've committed these as examples (they only need 0.11 to run, so you<br>
>> can just copy these files if you want to play with them, or pull from<br>
>> master):<br>
>><br>
>> <a href="https://github.com/ipython/ipython/blob/master/docs/examples/lib/ipkernel_qtapp.py" target="_blank">https://github.com/ipython/ipython/blob/master/docs/examples/lib/ipkernel_qtapp.py</a><br>
>> <a href="https://github.com/ipython/ipython/blob/master/docs/examples/lib/ipkernel_wxapp.py" target="_blank">https://github.com/ipython/ipython/blob/master/docs/examples/lib/ipkernel_wxapp.py</a><br>
>><br>
>> Those two both use the same common machinery:<br>
>><br>
>> <a href="https://github.com/ipython/ipython/blob/master/docs/examples/lib/internal_ipkernel.py" target="_blank">https://github.com/ipython/ipython/blob/master/docs/examples/lib/internal_ipkernel.py</a><br>
>><br>
>> The idea is that you can have a full IPython kernel embedded in any<br>
>> GUI app (in this case, shown with either WX or Qt), and the app can<br>
>> then fire up a Qt console (or you can attach one externally). The GUI<br>
>> app is modifying variables (the Count++ button) and dumping the user<br>
>> namespace to the console via buttons, while the Qt console can plot<br>
>> variables, run code, etc, that's in the namespace dict.<br>
>><br>
>> These examples show that it actually takes very little code, and that<br>
>> this extra code is fairly generic (I used the same code for both the<br>
>> Qt and the WX examples). In a real application it would be structured<br>
>> slightly differently, but the ideas should be clear from this simple<br>
>> example.<br>
>><br>
>> I hope this is useful, since this is something that I've been asked<br>
>> *many* times over the years.<br>
>><br>
>> Cheers,<br>
>><br>
>> f<br>
><br>
_______________________________________________<br>
IPython-User mailing list<br>
<a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
</blockquote></div><br>