code: def set_mode(self, mode):
          
          MODES = ['error', 'scroll']
          if mode.lower() not in MODES:
              raise TDLError('mode must be one of %s, got %s' % (MODES, repr(mode)))
          self._scrollMode = mode.lower()
docs: Configure how this console will react to the cursor writing past the
          end if the console.
  
          This is for methods that use the virtual cursor, such as
          :any:`print_str`.
  
          Args:
              mode (Text): The mode to set.
  
              Possible settings are:
  
             - 'error' - A TDLError will be raised once the cursor
               reaches the end of the console.  Everything up until
               the error will still be drawn.
               This is the default setting.
             - 'scroll' - The console will scroll up as stuff is
               written to the end.
               You can restrict the region with :any:`tdl.Window` when
               doing this.
  
          ..seealso:: :any:`write`, :any:`print_str`