How do I move printing position up one line in terminal
I'm already aware of using \b and \r to move back one character and to the beginning on the line respectively. But i开发者_StackOverflow社区s there a way, (specifically in python,) to move the cursor position up 1 line? I'm trying to avoid using curses, but if this is the best option then so be it.
The cuu1
capability will give you the sequence you need in order to do so.
echo -e "aa\n$(tput cuu1)b"
精彩评论