使用单元格中的命令重新启动ipython内核 [英] Restart ipython Kernel with a command from a cell

查看:115
本文介绍了使用单元格中的命令重新启动ipython内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过从笔记本GUI中选择Kernel> Restart而不是通过在笔记本单元中执行命令来重启ipython内核?

Is it possible to restart an ipython Kernel NOT by selecting Kernel > Restart from the notebook GUI, but from executing a command in a notebook cell?

推荐答案

如Thomas K.所建议的,这是从键盘重新启动ipython内核的方法:

As Thomas K. suggested, here is the way to restart the ipython kernel from your keyboard:

import os
os._exit(00)

这篇关于使用单元格中的命令重新启动ipython内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆