(self, args)
LOCATE: Set cursor position, shape and visibility.
LOCATE: Set cursor position, shape and visibility.
LOCATE : Set cursor position shape and visibility .
def locate_(self, args):
        """LOCATE: Set cursor position, shape and visibility."""
        args = list(None if arg is None else values.to_int(arg) for arg in args)
        args = args + [None] * (5-len(args))
        row, col, cursor, start, stop = args
        row = self.current_row if row is None else row
        col = self.current_col if col is None else col
        error.throw_if(row == self.mode.height and self._bottom_bar.visible)
        if self.scroll_area.active:
            error.range_check(self.scroll_area.top, self.scroll_area.bottom, row)
        else:
            error.range_check(1, self.mode.height, row)
        error.range_check(1, self.mode.width, col)
        if row == self.mode.height:
            # temporarily allow writing on last row
            self._bottom_row_allowed = True
        self.set_pos(row, col, scroll_ok=False)
        if cursor is not None:
            error.range_check(0, (255 if self._tandytext else 1), cursor)
            # set cursor visibility - this should set the flag but have no effect in graphics modes
            self._cursor.set_textmode_override(cursor != 0)
        error.throw_if(start is None and stop is not None)
        if stop is None:
            stop = start
        if start is not None:
            error.range_check(0, 31, start, stop)
            # cursor shape only has an effect in text mode
            if self.mode.is_text_mode:
                self._cursor.set_shape(start, stop)
def locate_ ( self , args ) : args = list ( None if arg is None else values . to_int ( arg ) for arg in args ) args = args + [ None ] * ( 5 - len ( args ) ) row , col , cursor , start , stop = args row = self . current_row if row is None else row col = self . current_col if col is None else col error . throw_if ( row == self . mode . height and self . _bottom_bar . visible ) if self . scroll_area . active : error . range_check ( self . scroll_area . top , self . scroll_area . bottom , row ) else : error . range_check ( 1 , self . mode . height , row ) error . range_check ( 1 , self . mode . width , col ) if row == self . mode . height : # temporarily allow writing on last row self . _bottom_row_allowed = True self . set_pos ( row , col , scroll_ok = False ) if cursor is not None : error . range_check ( 0 , ( 255 if self . _tandytext else 1 ) , cursor ) # set cursor visibility - this should set the flag but have no effect in graphics modes self . _cursor . set_textmode_override ( cursor != 0 ) error . throw_if ( start is None and stop is not None ) if stop is None : stop = start if start is not None : error . range_check ( 0 , 31 , start , stop ) # cursor shape only has an effect in text mode if self . mode . is_text_mode : self . _cursor . set_shape ( start , stop )