def move_up ( lines = 1 , file = sys . stdout ) : move . up ( lines ) . write ( file = file )
move cursor up and to beginning of line python
Move the cursor up a number of lines .
def move_up(lines=1, file=sys.stdout):
    """ Move the cursor up a number of lines.

        Esc[ValueA:
        Moves the cursor up by the specified number of lines without changing
        columns. If the cursor is already on the top line, ANSI.SYS ignores
        this sequence.
    """
    move.up(lines).write(file=file)