[IPython-User] Canncial way to do web based ipython shell?

Anthony Oliver anthony@ingenuitas....
Mon Jan 23 10:02:11 CST 2012


Yeah, this makes more sense now that I have dug into the code a little bit.
  What I basically wanted was it to always use the existing kernel if there
was one, if not then spawn a new one, so it looks like I'll just have to
tweak the template and handlers a little bit to get what I want I think.


---------------------------------
Anthony Oliver
Chief Technology Officer
http://www.ingenuitas.com
(906) 289-8169
anthony@ingenuitas.com
---------------------------------



On Fri, Jan 20, 2012 at 1:38 PM, Brian Granger <ellisonbg@gmail.com> wrote:

> Anthony,
>
> On Thu, Jan 19, 2012 at 11:30 AM, Anthony Oliver <anthony@ingenuitas.com>
> wrote:
> > Brian,
> >
> > No this helps a lot.  I want the functionality and have looked at a lot
> of
> > other apps but we have been using ipython before the notebook
> implementation
> > and feel it's way better than anything else out there.  I spent some more
> > time yesterday poking around the code.  I think I can pull out what I
> don't
> > want from it.  In reality I basically want all the same functionality as
> the
> > notebook, I'm even fine with keeping a history, etc.  Basically I think I
> > just need to tell it to use the same kernel every time instead of firing
> up
> > another instance.  Does this sound correct? Or would the better way be to
> > start a new kernel instance and kill any old ones saved?
>
> The current implementation of the notebook already has this.  When you
> open a give notebook, it will start a kernel.  If you close that
> notebook and open it later, the same exact kernel will still be
> running and will be used.  Kernels run as long as the notebook server
> is run.  Is this what you are after?  If not could you better describe
> what you mean.  Do you want one kernel for *all* notebook?  One per
> notebook?
>
> > I guess the TL;DR is I want a singleton instance of a notebook. ;-)
> > The way it sounds it isn't possible with the way it's designed.  We are
> > currently using cherrypy, not sure what it would take to port over to
> this,
> > but we can use tornado if that is a big staple as well.
> >
> > p.s. Thanks to the ipython team for all your work, anytime I jump on a
> > system without ipython now it makes me a sad panda.
>
> Great, glad you are enjoying it!
>
> Cheers,
>
> Brian
>
> >
> > ---------------------------------
> > Anthony Oliver
> > Chief Technology Officer
> > http://www.ingenuitas.com
> > (906) 289-8169
> > anthony@ingenuitas.com
> > ---------------------------------
> >
> >
> >
> > On Wed, Jan 18, 2012 at 1:19 PM, Brian Granger <ellisonbg@gmail.com>
> wrote:
> >>
> >> On Tue, Jan 17, 2012 at 1:45 PM, Anthony Oliver <anthony@ingenuitas.com
> >
> >> wrote:
> >> > Is there a correct way to just build the shell that could work within
> a
> >> > browser, or an example somewhere?
> >>
> >> You would need to build a custom web application from the ground up.
> >> The best example is the current notebook code.  It shows how to use
> >> ZeroMQ to communicate with IPython kernels using JSON messages.  But
> >> the code is not really designed to be used as a library.  We plan on
> >> moving in that direction, but it will take time.
> >>
> >> > I basically want the functionality of the notebook.  My problem with
> >> > using
> >> > notebooks is that we are currently using ipython as an embedded shell
> >> > which
> >> > is awesome. But we want to extend it through a web interface, the
> >> > notebook
> >> > method is perfectly fine, except in our application, the current
> running
> >> > program is always in context, so you can think of it as only ever
> >> > needing
> >> > one notebook.
> >> >
> >> > I started diving into the notebook app itself, it appears much of the
> >> > javascript is also looking for things (for instance I tried to
> override
> >> > the
> >> > handlers for the paths so the same thing is always served).  I can
> >> > continue
> >> > on my path, but I would imagine there maybe a more stripped down
> example
> >> > floating around some where.
> >>
> >> Unfortunately we don't have any other examples.  On one hand, the
> >> notebook app is a fairly simple example itself.  It shows the basics
> >> of how you would communicate with kernels and display output, etc.  On
> >> the other hand, notebook web application is extremely complex.  There
> >> are multiple channels of communication (WebSockets, Ajax), everything
> >> is async and you have to wade through our JSON based message protocol.
> >>  Not sure if this helps, but I think your approach of diving into the
> >> notebook code base is a good one.
> >>
> >> Cheers,
> >>
> >> Brian
> >>
> >> > Thanks.
> >> >
> >> > ---------------------------------
> >> > Anthony Oliver
> >> > Chief Technology Officer
> >> > http://www.ingenuitas.com
> >> > (906) 289-8169
> >> > anthony@ingenuitas.com
> >> > ---------------------------------
> >> >
> >> >
> >> > _______________________________________________
> >> > IPython-User mailing list
> >> > IPython-User@scipy.org
> >> > http://mail.scipy.org/mailman/listinfo/ipython-user
> >> >
> >>
> >>
> >>
> >> --
> >> Brian E. Granger
> >> Cal Poly State University, San Luis Obispo
> >> bgranger@calpoly.edu and ellisonbg@gmail.com
> >
> >
>
>
>
> --
> Brian E. Granger
> Cal Poly State University, San Luis Obispo
> bgranger@calpoly.edu and ellisonbg@gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120123/8751e680/attachment-0001.html 


More information about the IPython-User mailing list