[IPython-User] Putting a kernel inside a GUI (WX or Qt) application so you can run external Qt consoles against it.

Piotr Zolnierczuk piotr.zolnierczuk@gmail....
Fri Aug 5 14:55:52 CDT 2011


Fernando:

That is really great! Now I have really no excuse to run embedded 0.9.1
anymore :)

I have a one followup question: how to pass my namespace to the kernel - the
examples seem to do the opposite.

Piotr

On Fri, Aug 5, 2011 at 1:00 PM, <ipython-user-request@scipy.org> wrote:

> Send IPython-User mailing list submissions to
>        ipython-user@scipy.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://mail.scipy.org/mailman/listinfo/ipython-user
> or, via email, send a message with subject or body 'help' to
>        ipython-user-request@scipy.org
>
> You can reach the person managing the list at
>        ipython-user-owner@scipy.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of IPython-User digest..."
>
> Today's Topics:
>
>   1. Putting a kernel inside a GUI (WX or Qt) application so you
>      can run external Qt consoles against it. (Fernando Perez)
>   2. Re: Question about vim-ipython (Jorge Scandaliaris)
>   3. Re: connecting to remote kernel in 0.11 (Toby Burnett)
>   4. hsplit or vsplit? (Klonuo Umom)
>   5. Re: hsplit or vsplit? (Thomas Kluyver)
>   6. Re: hsplit or vsplit? (Paul Ivanov)
>
>
> ---------- Forwarded message ----------
> From: Fernando Perez <fperez.net@gmail.com>
> To: IPython User list <ipython-user@scipy.org>
> Date: Fri, 5 Aug 2011 00:20:02 -0700
> Subject: [IPython-User] Putting a kernel inside a GUI (WX or Qt)
> application so you can run external Qt consoles against it.
> Hi all,
>
> [ forgot to CC the user list, where people who aren't on the dev list
> may care about this... ]
>
> we knew this was in principle possible given the new architecture, but
> in working with a colleague today I had to actually implement it, so
> I've committed these as examples (they only need 0.11 to run, so you
> can just copy these files if you want to play with them, or pull from
> master):
>
>
> https://github.com/ipython/ipython/blob/master/docs/examples/lib/ipkernel_qtapp.py
>
> https://github.com/ipython/ipython/blob/master/docs/examples/lib/ipkernel_wxapp.py
>
> Those two both use the same common machinery:
>
>
> https://github.com/ipython/ipython/blob/master/docs/examples/lib/internal_ipkernel.py
>
> The idea is that you can have a full IPython kernel embedded in any
> GUI app (in this case, shown with either WX or Qt), and the app can
> then fire up a Qt console (or you can attach one externally).  The GUI
> app is modifying variables (the Count++ button) and dumping the user
> namespace to the console via buttons, while the Qt console can plot
> variables, run code, etc, that's in the namespace dict.
>
> These examples show that it actually takes very little code, and that
> this extra code is fairly generic (I used the same code for both the
> Qt and the WX examples).  In a real application it would be structured
> slightly differently, but the ideas should be clear from this simple
> example.
>
> I hope this is useful, since this is something that I've been asked
> *many* times over the years.
>
> Cheers,
>
> f
>
>
>
> ---------- Forwarded message ----------
> From: Jorge Scandaliaris <jorgesmbox-ml@yahoo.es>
> To: ipython-user@scipy.net
> Date: Fri, 5 Aug 2011 12:59:01 +0000 (UTC)
> Subject: Re: [IPython-User] Question about vim-ipython
> Paul Ivanov <pivanov314 <at> gmail.com> writes:
>
> > Hi Jorge,
> >
> > glad you like it, the IPython guys certainly made all of this
> > awesomeness possible, so big kudos to them!
> >
> > Are you running within screen by chance?
> >
> > I have this line in my .bashrc
> >
> > # http://munkymorgy.blogspot.com/2008/07/screen-ctrl-s-bug.html
> > stty stop undef #To unmap ctrl-s
> >
>
> You were spot on, I am using screen and your suggestion solves the problem.
>
> > also, does it work in gvim?
>
> I don't usually use gvim, but I did a quick test and it seems to work also
> there.
>
> I still haven't played with all the features, but from now on I'll use it
> regularly so I'll report back on any issues I find.
>
> Regards,
>
> Jorges
>
>
>
>
>
>
> ---------- Forwarded message ----------
> From: Toby Burnett <tburnett@uw.edu>
> To: "ipython-user@scipy.org" <ipython-user@scipy.org>
> Date: Fri, 5 Aug 2011 14:23:48 +0000
> Subject: Re: [IPython-User] connecting to remote kernel in 0.11
>
> I’m very interested in how to do this as well, although I’m not so
> concerned about security. A slight variation, I’d like to connect to a
> server on a Linux machine from a Windows host, I presume not an issue. I’m
> wondering about how plots would be treated, I suspect that the kernel would
> not be able to create windows on a remote machine, but one could use the
> display function in a client to embed plots?****
>
> ** **
>
> On the subject of this nice new capability, I’m scratching my head for use
> cases to justify having multiple clients. So far I’ve thought of being able
> to create a compact notebook-like log on a secondary session, with all the
> mistakes and wrong turns in the primary one. ****
>
> ** **
>
> --Toby Burnett****
>
>
> ---------- Forwarded message ----------
> From: Klonuo Umom <klonuo@gmail.com>
> To: ipython-user@scipy.org
> Date: Fri, 5 Aug 2011 16:55:43 +0200
> Subject: [IPython-User] hsplit or vsplit?
> When paging in qtconsole is set to hsplit it renders like this:
>
> | Console | Pager |
>
> and when set to vsplit, like this:
>
> ----
> Console
> ----
> Pager
> ----
>
> I don't understand whats horizontal in hsplit (it has vertical
> splitter so it splits screen vertically) and what's vertical in
> vsplit? If I try harder I may notice that it may mean split in
> horizontal columns and vertical rows, but seems strange. It could be
> just in my mind or minor syntactic issue
>
>
>
> ---------- Forwarded message ----------
> From: Thomas Kluyver <takowl@gmail.com>
> To: Klonuo Umom <klonuo@gmail.com>
> Date: Fri, 5 Aug 2011 16:06:10 +0100
> Subject: Re: [IPython-User] hsplit or vsplit?
> On 5 August 2011 15:55, Klonuo Umom <klonuo@gmail.com> wrote:
>
>> When paging in qtconsole is set to hsplit it renders like this:
>>
>> | Console | Pager |
>>
>> and when set to vsplit, like this:
>>
>> ----
>> Console
>> ----
>> Pager
>> ----
>>
>> I don't understand whats horizontal in hsplit (it has vertical
>> splitter so it splits screen vertically) and what's vertical in
>> vsplit? If I try harder I may notice that it may mean split in
>> horizontal columns and vertical rows, but seems strange. It could be
>> just in my mind or minor syntactic issue
>>
>
> That's the way I'd expect them (and I wasn't involved with designing that).
> With hsplit, the splitter bar itself is vertical, but it is (to my mind)
> splitting the contents of the window horizontally.
>
> Thomas
>
>
>
> ---------- Forwarded message ----------
> From: Paul Ivanov <pivanov314@gmail.com>
> To: ipython-user@scipy.org
> Date: Fri, 5 Aug 2011 08:24:34 -0700
> Subject: Re: [IPython-User] hsplit or vsplit?
> > On 5 August 2011 15:55, Klonuo Umom <klonuo@gmail.com> wrote:
> > > When paging in qtconsole is set to hsplit it renders like this:
> > >
> > > | Console | Pager |
> > >
> > > and when set to vsplit, like this:
> > >
> > > ----
> > > Console
> > > ----
> > > Pager
> > > ----
> > >
> > > I don't understand whats horizontal in hsplit (it has vertical
> > > splitter so it splits screen vertically) and what's vertical in
> > > vsplit? If I try harder I may notice that it may mean split in
> > > horizontal columns and vertical rows, but seems strange. It could be
> > > just in my mind or minor syntactic issue
>
> I'm with Klonuo on this one, the implementation was exactly
> counter to my beliefs (read on)
>
> Thomas Kluyver, on 2011-08-05 16:06,  wrote:
> > That's the way I'd expect them (and I wasn't involved with designing
> that).
> > With hsplit, the splitter bar itself is vertical, but it is (to my mind)
> > splitting the contents of the window horizontally.
>
> vi users all disagree with you - both vim and nvi have :vsplit as
> | Console | Pager |
>
> :)
> --
> Paul Ivanov
> 314 address only used for lists,  off-list direct email at:
> http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk48CywACgkQe+cmRQ8+KPdZDQCfdgXPsTFnYcKN2KzVkC2EXQ9q
> loEAn1HuekbBF299yGNe0rLrk47KeS4B
> =9+6Y
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>


-- 

Piotr Adam Zolnierczuk
e-mail: piotr@zolnierczuk.net
www:   http://www.zolnierczuk.net
_____________________________________
written on recycled electrons
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20110805/3a5753b1/attachment.html 


More information about the IPython-User mailing list