Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python move cursor to previous line

"33[F" – move cursor to the beginning of the previous line
"33[A" – move cursor up one line

Example:
  import sys
  sys.stdout.write("33[F")
  sys.stdout.write("This line is replaced one")
  sys.stdout.write("33[A")
  sys.stdout.write("More text is added to the previous line")
  sys.stdout.flush()
 
PREVIOUS NEXT
Tagged: #python #move #cursor #previous #line
ADD COMMENT
Topic
Name
1+6 =