I am trying to write a console application in Python3.
The problem is I would like all output messages EG: print("Status message") to be above the input line at the bottom.
Status message 1
Status message 2
Status message 3
Console:> I want to type here while the output messages displayed
at the moment it looks more like this
Console:> want to type here while the outStatus message 1
put messages displayed
Is there anyway to do this without using curses?
Try this:
print chr(27)+'[2AOutput'
Hope this is what you are asking for.
Sorry the above is for Python 2.7. I am not sure whether the Python 3 version
print(chr(27)+'[2AOutput')
will work or not.
Ref: http://en.wikipedia.org/wiki/ANSI_escape_code
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With