>From what I can gather, it seems the way to accomplish this would be 
through either making a custom server extension 
<http://jupyter-notebook.readthedocs.io/en/stable/extending/handlers.html> 
or using the jupyter kernel gateway 
<https://github.com/jupyter/kernel_gateway>.

Regarding the latter approach I think I would need to make a custom manager 
which overrides start_kernel() (here's an example 
<https://github.com/jupyter/kernel_gateway/blob/master/kernel_gateway/services/kernels/manager.py#L75>
 
I found) to connect to an existing IPython kernel rather than starting a 
branch new one.

Can anyone comment on which approach would be the better one?

Thanks.

On Friday, February 9, 2018 at 3:57:59 PM UTC-8, Edward Banner wrote:
>
> I am attempting to associate a jupyter notebook with a running IPython 
> kernel. This kernel is running outside of jupyter (accomplished by running 
> the following code in a python process):
>
> import IPython
> IPython.embed_kernel()
>
> which produces the following output
>
> To connect another client to this kernel, use:
>     --existing kernel-9692.json
>
> I can attach to this kernel through jupyter console and jupyter qtconsole, 
> but not with jupyter notebook. As referenced in this issue this is not 
> because of any inherent technical limitation, but rather because it would 
> be confusing from a UI perspective.
>
> I believe the first step would be registering the running kernel with the 
> jupyer notebook server so that the kernel is returned on GET 
> localhost:8888/api/kernels. The hope being then that I could point an 
> existing jupyter notebook to use that kernel (I haven't figured out how to 
> do that as it doesn't appear to be documented on this page).
>
> How can I achieve this first step of registering this IPython kernel with 
> a running jupyter notebook server?
>
> Thanks in advance.
>
>
> On Friday, February 9, 2018 at 3:05:18 PM UTC-8, Edward Banner wrote:
>>
>> Hi,
>>
>> I am attempting to associate a jupyter notebook with a running IPython 
>> kernel. This kernel is running outside of jupyter (accomplished by running 
>> the following code in a python process):
>>
>> import IPython
>>
>> IPython.embed_kernel()
>>
>> which produces the following output
>>
>> To connect another client to this kernel, use:
>>
>>     --existing kernel-9692.json
>>
>> I can attach to this kernel through jupyter console and jupyter 
>> qtconsole, but not with jupyter notebook. As referenced in this issue 
>> <https://github.com/ipython/ipython/issues/4066> this is not because of 
>> any inherent technical limitation, but rather because it would be confusing 
>> from a UI perspective.
>>
>> I believe the first step would be registering the running kernel with the 
>> jupyer notebook server so that the kernel is returned on GET 
>> localhost:8888/api/kernels. The hope being then that I could point an 
>> existing jupyter notebook to use that kernel (I haven't figured out how to 
>> do that as it doesn't appear to be documented on this page 
>> <https://github.com/jupyter/jupyter/wiki/Jupyter-Notebook-Server-API>).
>>
>> How can I achieve this first step of registering this IPython kernel with 
>> a running jupyter notebook server?
>>
>> Thanks in advance.
>>
>

-- 
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/f303545d-ce14-4935-ab0e-8383ef439b9d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to