IPython notebook:如何连接到现有内核?

Opl*_*tek 12 ipython ipython-notebook

我可以通过以下方式将两个ipython console会话连接到一个内核:

$ ipython console
In [1]: %connect_info  
{
   ... Content of JSON with info for connecting ...
}

Paste the above JSON into a file, and connect with:
    $> ipython <app> --existing <file>
or, if you are local, you can connect with just:
    $> ipython <app> --existing kernel-43204.json
or even just:
    $> ipython <app> --existing
    if this is the most recent IPython session you have started.
Run Code Online (Sandbox Code Playgroud)

因此我可以<app>再次替换控制台

$ ipython console --existing kernel-43204.json
Run Code Online (Sandbox Code Playgroud)

但是,我想与ipython笔记本共享我的内核,以便我可以看到我的数据.我尝试过但失败了:

$ ipython notebook --existing kernel-43204.json
[C 13:35:01.025 NotebookApp] Unrecognized flag: '--existing'
Run Code Online (Sandbox Code Playgroud)

有什么建议我如何工作和切换ipython consoleipython notebook

Mat*_*att 9

没有用户界面,也没有使用笔记本电脑的API,假设代码简单,笔记本电脑是拥有和启动内核的人.您必须编写自己的KernelManager子类并配置IPython才能使用它(+编写一些UI代码,如果您希望它易于使用),以便您能够选择已有的内核.