Reputation: 758
How do I add a new line in a prompt?
session.send('This is line 1. This is line 2.');
I want the output to look like:
This is line 1.
This is line 2.
But the output I get is:
This is line 1. This is line 2.
I tried using \n
, \r\n
and os.EOL
but none of them worked. Is it possible to add a new line in a prompt?
Upvotes: 6
Views: 4316
Reputation: 719
Well, it depends on
single quotes ' '
double quotes " "
if you use double quotes, you have to use \n\n
and
if you use single quotes, you have to use <br/>
Example,
session.send('This is Line 1 <br/>This is Line 2<br/>');
session.send("This is line 1\n\n This is line 2\n\n");
Upvotes: 2