我可以通过以下方式将两个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 …
Run Code Online (Sandbox Code Playgroud)