On Friday, November 18, 2016 at 7:52:23 AM UTC-5, Min RK wrote: > > On Sat, Nov 12, 2016 at 11:39 PM, Christopher Brooks <[email protected] > <javascript:>> wrote: > > Wonderful, thanks very much MinRK. Is callbacks just a function which >> takes a single parameter, or are there docs on this api which I have >> overlooked? >> > callbacks is a structure for different types of callbacks. Its shape is > described here > <https://github.com/jupyter/notebook/blob/4.2.2/notebook/static/services/kernels/kernel.js#L749> > . >
I'm working with some code that calls this as well. Are the standard callbacks (for print, error handling, display, etc) available to plugin in here? It would be handy to have the standard callbacks available, or to be able to slightly alter/replace particular ones (eg, dispay). -Doug > -Min > > Chris >> >> On Nov 12, 2016 4:39 PM, "MinRK" <[email protected] <javascript:>> >> wrote: >> >> JupyterLab services is for use in the browser, that’s what JupyterLab >> uses to talk to these APIs. If you are already in the existing pre-Lab >> notebook and want to run code on the current kernel, the API you are after >> is: >> >> Jupyter.notebook.kernel.execute("some code", callbacks) >> >> -MinRK >> >> >> On Fri, Nov 11, 2016 at 4:19 PM, Christopher Brooks <[email protected] >> <javascript:>> wrote: >> >>> Hi, >>> >>> I'm trying to do a bit of rapid prototyping of a jupyter javascript >>> extension which invokes services against a python kernel. The docs take >>> some serious time, but what I've groked is that there are a set of >>> REST-based >>> services >>> <http://petstore.swagger.io/?url=https://raw.githubusercontent.com/jupyter/notebook/master/notebook/services/api/api.yaml#/sessions> >>> >>> which I call, but it seems like these services do not allow me to push code >>> to the kernel, just identify which kernels and sessions are available. It >>> seems instead that once I have identified a kernel, I can use this wire >>> protocol >>> <https://jupyter-client.readthedocs.io/en/latest/messaging.html> for >>> interaction with the kernel. However, I'm unclear which endpoint to push >>> messages to and feel like there must be a browser-based Javascript library >>> available for this purpose. COMMs caught my eye, but again, it seems like >>> it should be more straight forward to push some python strings to a kernel >>> and observe the results. The JupyterLab Services >>> <https://github.com/jupyterlab/services> looked promising, but it's all >>> Node.jsified, which makes me think this is the wrong tree to bark down. >>> >>> Maybe someone could give me a gentle nudge in the right direction? >>> >>> (I sort of expected something as trivial as an >>> IPython.Notebook.execute("somecode")....) >>> >>> Regards, >>> >>> Chris >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Project Jupyter" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected] <javascript:>. >>> >>> To post to this group, send email to [email protected] >>> <javascript:>. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jupyter/4823f311-80a5-4597-abbd-fc86b17bf0ea%40googlegroups.com >>> >>> <https://groups.google.com/d/msgid/jupyter/4823f311-80a5-4597-abbd-fc86b17bf0ea%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Project Jupyter" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jupyter/FJwiVIOxUXc/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/CAHNn8BWg6LKLFNr8iC3guVKO_Zv6Thm15DS%3DOp712Pu-N02HtQ%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/jupyter/CAHNn8BWg6LKLFNr8iC3guVKO_Zv6Thm15DS%3DOp712Pu-N02HtQ%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Project Jupyter" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/CAJQ6OJMw%2BNbqE9BeTfbLFb5a0Ngoj8Y0SUdmvnyYtu6SpQQ51Q%40mail.gmail.com >> >> <https://groups.google.com/d/msgid/jupyter/CAJQ6OJMw%2BNbqE9BeTfbLFb5a0Ngoj8Y0SUdmvnyYtu6SpQQ51Q%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/afac1b31-f2c8-4cc5-9410-3485190c5803%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
