IPython 5.0:删除输入行之间的空格

IPython 5.0: Remove spaces between input lines

(本题本质上是this question,但针对IPython 5.0版本)

我想要 IPython 5.0 的经典提示。

question helps customize my prompt. In fact, I discovered that IPython has a class definition for the ClassicPrompts 已经。

我需要做的就是将以下内容放入名为 00-classic-prompts.py 的文件或 ~/.ipython/profile_default/startup/ 中的类似文件中:

from IPython.terminal.prompts import ClassicPrompts

ip = get_ipython()
ip.prompts = ClassicPrompts(ip)

但不同的提示行仍然呈现为:

>>> print('Hello world!')
Hello world!

>>> 

在每个输入提示前多加一个换行符。我该如何删除它?

请将此行附加到现有启动脚本的底部:

ip.separate_in = ''

这是一个 documented feature 但目前没有描述,因此很难找到。