Return a new line if it is available.

        Precondition: self.yieldable() must be True
514645
def return_line(self):
        
        assert(self.yieldable())

        t = _remove_trailing_new_line(self.read_buffer)
        i = _find_furthest_new_line(t)

        if i >= 0:
            l = i + 1
            after_new_line = slice(l, None)
            up_to_include_new_line = slice(0, l)
            r = t[after_new_line]
            self.read_buffer = t[up_to_include_new_line]
        else:  # the case where we have read in entire file and at the "last" line
            r = t
            self.read_buffer = None
        return r
660545
def waitForInput(self):
        
        self._waitingForInput = False
        
        try:
            if self.isDestroyed() or self.isReadOnly():
                return
        except RuntimeError:
            return
        
        self.moveCursor(QTextCursor.End)
        if self.textCursor().block().text() == '>>> ':
            return
        
        # if there is already text on the line, then start a new line
        newln = '>>> '
        if projex.text.nativestring(self.textCursor().block().text()):
            newln = '\n' + newln
        
        # insert the text
        self.setCurrentMode('standard')
        self.insertPlainText(newln)
        self.scrollToEnd()
        
        self._blankCache = ''
29029
function permuteLine(line, startIndex){
    var newLine = [];
    for (let i = 0; i < line.length; i++){
        var index = (i + startIndex) % line.length;
        // skip the first (repeated) index
        if (index !== 0) {
            newLine.push(line[index]);
        }
    }
    newLine.push(newLine[0]);
    return newLine;
}
1046944
def readline(self, timeout=1):  # pylint: disable=unused-argument
        
        data = None
        if self.read_thread:
            # Ignore the timeout value, return imediately if no lines in queue
            data = self.read_thread.readline()
            if data and self.__print_io:
                self.logger.info(data, extra={'type': '<--'})
        return data
565675
def _skip_newlines(self):
        """"""
        while self._cur_token['type'] is TT.lbreak and not self._finished:
            self._increment()
243828
def recv_line(self, max_size=None, timeout='default', ending=None):
        
        if ending is None:
            ending = self.LINE_ENDING
        return self.recv_until(ending, max_size, timeout)
404134
def get_line(self, text, on_unicode_error='strict'):
        

        def check(entry):
            if entry.find('\n') != -1:
                raise ValueError(
                    "get_line processes one line at a time (remove \'\\n\')"
                )
            entry += "\n"
            return entry

        if type(text) == list:
            text = [check(entry) for entry in text]
            return self.f.multilineGetLine(text, on_unicode_error)
        else:
            text = check(text)
            return self.f.getLine(text, on_unicode_error)
90310
def newLine(self) :
		""""""
		l = CSVEntry(self)
		if self.keepInMemory :
			self.lines.append(l)
		return l
1002007
def acquire(self) -> Connection:
        '''
        '''
        assert not self._closed

        yield from self._condition.acquire()

        while True:
            if self.ready:
                connection = self.ready.pop()
                break
            elif len(self.busy) < self.max_connections:
                connection = self._connection_factory()
                break
            else:
                yield from self._condition.wait()

        self.busy.add(connection)
        self._condition.release()

        return connection
296122
def lineReceived(self, line):
        
        if line.startswith(b"#"): # ignore it
            return
        if line.startswith(b"OK"):
            # if no command issued, then just 'ready'
            if self._ready:
                self._dq.pop(0).callback(self._currentResponse(line))
            else:
                self._ready = True
        if line.startswith(b"D "):
            self._bufferedData.append(line[2:].replace(b"%0A", b"\r")
                                      .replace(b"%0D", b"\n")
                                      .replace(b"%25", b"%"))
        if line.startswith(b"ERR"):
            self._dq.pop(0).errback(AssuanError(line))
870960
def load_lines(self, key, noexpire=None):
        ''''''
        return line_iterator(self.load_fd(key, noexpire=noexpire))
943470
def next_line(self, require_prefix=True):
        
        if require_prefix:
            m = self.expect_re(r'(?m)[^\n]*?$\n?')
        else:
            m = self._expect_re(r'(?m)[^\n]*$\n?', self.pos)
        self.match = m
        if m:
            return m.group()
392257
def readline(self, limit=-1):
        

        if not self._universal and limit < 0:
            # Shortcut common case - newline found in buffer.
            i = self._readbuffer.find(b'\n', self._offset) + 1
            if i > 0:
                line = self._readbuffer[self._offset: i]
                self._offset = i
                return line

        if not self._universal:
            return io.BufferedIOBase.readline(self, limit)

        line = b''
        while limit < 0 or len(line) < limit:
            readahead = self.peek(2)
            if readahead == b'':
                return line

            #
            # Search for universal newlines or line chunks.
            #
            # The pattern returns either a line chunk or a newline, but not
            # both. Combined with peek(2), we are assured that the sequence
            # '\r\n' is always retrieved completely and never split into
            # separate newlines - '\r', '\n' due to coincidental readaheads.
            #
            match = self.PATTERN.search(readahead)
            newline = match.group('newline')
            if newline is not None:
                if self.newlines is None:
                    self.newlines = []
                if newline not in self.newlines:
                    self.newlines.append(newline)
                self._offset += len(newline)
                return line + b'\n'

            chunk = match.group('chunk')
            if limit >= 0:
                chunk = chunk[: limit - len(line)]

            self._offset += len(chunk)
            line += chunk

        return line
527282
def parse_line(line, &block) # :yields: request
      if request_data = file_format.parse_line(line) { |wt, message| warn(wt, message) }
        @parsed_lines += 1
        update_current_request(request_data.merge(source: @current_source, lineno: @current_lineno), &block)
      end
    end
1182675
def read_until_yieldable(self):
        """"""
        while not self.yieldable():
            read_content, read_position = _get_next_chunk(self.fp, self.read_position, self.chunk_size)
            self.add_to_buffer(read_content, read_position)
512074
def _readline(self):
        
        if len(self.lines) > 1:
            return self.lines.pop(0)

        tail = ''
        if len(self.lines):
            tail = self.lines.pop()

        try:
            tail += self._read()
        except socket.error:
            logging.exception('No new data')
            time.sleep(0.1)

        self.lines += linesepx.split(tail)
        if len(self.lines) > 1:
            return self.lines.pop(0)
364258
def readline(self):
        """"""
        self.lineno += 1
        if self._buffer:
            return self._buffer.pop()
        else:
            return self.input.readline()