Praveen Praveen - 2 months ago 13x
Python Question

IPython 5.0: Remove spaces between input lines

(This question is essentially this question, but for IPython version 5.0)

I'd like to have a classic prompt with IPython 5.0.

This question helps customize my prompt. In fact, I discovered that IPython has a class definition for the


All I need to do is to put the following in a file called
or some such in

from IPython.terminal.prompts import ClassicPrompts

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

But different prompt lines still render as:

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


With an extra new-line before every input prompt. How can I remove this?

I notice the existence of a class called
in the IPython docs, but how do I use it?
(Looks like this class is an exception, meant for something else)

wim wim

Please append this line on the bottom of your existing startup script:

ip.separate_in = ''