(self, row, col)
Move cursor to a new position (1,1 is top left).
Move cursor to a new position (1,1 is top left).
Move cursor to a new position ( 1 1 is top left ) .
def move_cursor_to(self, row, col):
        """Move cursor to a new position (1,1 is top left)."""
        csbi = GetConsoleScreenBufferInfo(self._hstdout)
        row, col = row-1, col-1
        while col >= csbi.dwSize.X:
            col -= csbi.dwSize.X
            row += 1
        while col < 0:
            col += csbi.dwSize.X
            row -= 1
        # If the position is out of range, do nothing.
        if row >= 0 and col >= 0:
            _SetConsoleCursorPosition(self._hstdout, wintypes._COORD(col, row))
def move_cursor_to ( self , row , col ) : csbi = GetConsoleScreenBufferInfo ( self . _hstdout ) row , col = row - 1 , col - 1 while col >= csbi . dwSize . X : col -= csbi . dwSize . X row += 1 while col < 0 : col += csbi . dwSize . X row -= 1 # If the position is out of range, do nothing. if row >= 0 and col >= 0 : _SetConsoleCursorPosition ( self . _hstdout , wintypes . _COORD ( col , row ) )