我将iPython shell嵌入Django脚本(带有开发服务器,例如在localhost的runserver),如下所示:
...
from IPython.Shell import IPShellEmbed
ipshell = IPShellEmbed()
ipshell()
...
Run Code Online (Sandbox Code Playgroud)
这给了我在所需位置的互动外壳.现在,如果修改源代码,Django会自动重新加载,可能没有正确退出iPython shell,并"中断"我的终端模拟器(xterm,konsole) - 文本变得不可见等等(如果在Django中运行的iPython终止于Ctrl,效果相同+ d).
有什么建议可能导致这个?(我可能以错误的方式使用iPython,但谁知道).