官方网站it is said :
When a notebook is opened, its “computational engine” (called the kernel) is automatically started. Closing the notebook browser tab, will not shut down the kernel, instead the kernel will keep running until is explicitly shut down."
是否可以配置 iPython 服务器,以便内核与关联的选项卡一起被杀死?
最佳答案
经过一些研究和多次尝试,解决方案非常简单。在文件 profile/static/custom/custom.js
末尾添加以下代码:
$( window ).unload(function() {
IPython.notebook.kernel.kill();
});
非常适合我! (在 Chrome 上试过)
关于python - iPython notebook - 配置为在关闭选项卡时关闭内核,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32824542/