只需在一个单元格中执行%qtconsole,它将启动连接到同一内核的qtconsole。
当然你的内核需要是本地的。
你当然可以使用long方法:
In [1]: %connect_info
{
"stdin_port": 50845,
"ip": "127.0.0.1",
"control_port": 50846,
"hb_port": 50847,
"signature_scheme": "hmac-sha256",
"key": "c68e7f64-f764-4417-ba3c-613a5bf99095",
"shell_port": 50843,
"transport": "tcp",
"iopub_port": 50844
}
Paste the above JSON into a file, and connect with:
$> ipython --existing
or, if you are local, you can connect with just:
$> ipython --existing kernel-45781.json
or even just:
$> ipython --existing
if this is the most recent IPython session you have started.
然后
ipython qtconsole --existing kernel-45781.json