Returns the next line of input
        :return: string of input
430241
def get_next_input(self):
        

        # TODO: could override input if we get input coming in at the same time
        all_input = Deployment.objects.get(pk=self.id).input or ''
        lines = all_input.splitlines()
        first_line = lines[0] if len(lines) else None
        lines = lines[1:] if len(lines) > 1 else []
        Deployment.objects.filter(pk=self.id).update(input='\n'.join(lines))
        return first_line
177731
def next(self):
        """"""
        self.current_token = next(self.token_stream, None)
        if self.current_token is None:
            self.token_span = self.token_span[1], self.token_span[1]
            raise self.error('Unexpected end of input')
        self.token_span = self.current_token.span
        return self
315981
def next(self):
        
        if self.index < self.length:
            index = self.index
            self.index += 1
            return self.data[index]
        else:
            raise StopIteration()
877561
def next(self):
        
        while True:
            self.cur_idx += 1
            if self.__datasource.populate_iteration(self):
                return self

        raise StopIteration
1083453
def readline(self):
        
        line = ""
        n_pos = -1
        try:
            while n_pos < 0:
                line += self.next_chunk()
                n_pos = line.find('\n')
        except StopIteration:
            pass

        if n_pos >= 0:
            line, extra = line[:n_pos+1], line[n_pos+1:]
            self.unshift(extra)
        return line
104936
def _read_next(cls, lines: List[str]) -> 'FilePatch':
        
        # keep munching lines until we hit one starting with '---'
        while True:
            if not lines:
                raise Exception("illegal file patch format: couldn't find line starting with '---'")
            line = lines[0]
            if line.startswith('---'):
                break
            lines.pop(0)

        assert lines[0].startswith('---')
        assert lines[1].startswith('+++')
        old_fn = lines.pop(0)[4:].strip()
        new_fn = lines.pop(0)[4:].strip()

        hunks = []
        while lines:
            if not lines[0].startswith('@@'):
                break
            hunks.append(Hunk._read_next(lines))

        return FilePatch(old_fn, new_fn, hunks)
314678
def next(self):
        
        return self.iterator.next(task=self.task, timeout=self.timeout,
                                                    block=self.block)
109608
def _get_line(self):
        """"""
        line = self._f.readline()
        if len(line) == 0:
            raise StopIteration
        return line
1099325
def readline(self, limit=-1):
        """"""
        if limit != -1:
            raise NotImplementedError('limits other than -1 not implemented yet')
        the_line = io.BytesIO()
        while not (self._eof and len(self._buffer) == 0):
            #
            # In the worst case, we're reading the unread part of self._buffer
            # twice here, once in the if condition and once when calling index.
            #
            # This is sub-optimal, but better than the alternative: wrapping
            # .index in a try..except, because that is slower.
            #
            remaining_buffer = self._buffer.peek()
            if self._line_terminator in remaining_buffer:
                next_newline = remaining_buffer.index(self._line_terminator)
                the_line.write(self._read_from_buffer(next_newline + 1))
                break
            else:
                the_line.write(self._read_from_buffer())
                self._fill_buffer()
        return the_line.getvalue()
466503
def next(self):
        """"""
        # use readline here because next() iterator uses internal readahead
        # buffer so seek position is wrong
        line = self.filehandle.readline()
        line = line.decode('utf-8', 'replace')
        if line == '':
            raise StopIteration
        line = line.rstrip('\n')
        le = LogEvent(line)

        # hint format and nextpos from previous line
        if self._datetime_format and self._datetime_nextpos is not None:
            ret = le.set_datetime_hint(self._datetime_format,
                                       self._datetime_nextpos,
                                       self.year_rollover)
            if not ret:
                # logevent indicates timestamp format has changed,
                # invalidate hint info
                self._datetime_format = None
                self._datetime_nextpos = None
        elif le.datetime:
            # gather new hint info from another logevent
            self._datetime_format = le.datetime_format
            self._datetime_nextpos = le._datetime_nextpos

        return le
1318041
def read_line(self):
    
    while True:
      newline_idx = self.buf.find(b"\n")
      if newline_idx >= 0:
        res = self.buf[:newline_idx]
        self.buf = self.buf[newline_idx + 1:]
        return res
      chunk = self.f.recv(4096)
      if not chunk:
        raise EndOfStreamError()
      self.buf += chunk
878962
def next(self):
        
        if self._cur_row >= len(self._table):
            raise StopIteration
        data = self._table[self._cur_row].copy()
        self._cur_row += 1
        return data
679078
def next(self):
        
        if self.iter_next():
            self.data, self.label = self._read()
            return {self.data_name  :  self.data[0][1],
                    self.label_name :  self.label[0][1]}
        else:
            raise StopIteration
859969
def read_next_line(self):
        """"""

        next_line = self.file.readline()

        if not next_line or next_line[-1:] != '\n':
            # no newline on last line of file
            self.file = None
        else:
            # trim newline characters
            next_line = next_line[:-1]

        expanded = next_line.expandtabs()

        edit = urwid.Edit("", expanded, allow_tab=True)
        edit.set_edit_pos(0)
        edit.original_text = next_line
        self.lines.append(edit)

        return next_line
1298130
def readlines(self):
        
        continuation = False
        while True:
            yield self.readline(continuation)
            continuation = True
451818
def _read_next(cls, lines: List[str]) -> 'Hunk':
        
        header = lines[0]
        assert header.startswith('@@ -')

        # sometimes the first line can occur on the same line as the header.
        # in that case, we inject a new line into the buffer
        end_header_at = header.index(' @@')
        bonus_line = header[end_header_at+3:]
        if bonus_line != "":
            lines.insert(1, bonus_line)

        header = header[4:end_header_at]
        left, _, right = header.partition(' +')
        old_start_at = int(left.split(',')[0])
        new_start_at = int(right.split(',')[0])

        old_line_num = old_start_at
        new_line_num = new_start_at
        last_insertion_at = old_start_at


        hunk_lines = [] # type: List[HunkLine]
        while True:
            # discarding the previous line ensures that we only consume lines
            # from the line buffer that belong to the hunk
            lines.pop(0)
            if not lines:
                break

            line = lines[0]

            # inserted line
            if line.startswith('+'):
                hunk_lines.append(InsertedLine(line[1:]))
                new_line_num += 1

            # deleted line
            elif line.startswith('-'):
                hunk_lines.append(DeletedLine(line[1:]))
                old_line_num += 1

            # context line
            elif line.startswith(' '):
                hunk_lines.append(ContextLine(line[1:]))
                new_line_num += 1
                old_line_num += 1

            # end of hunk
            else:
                break

        return Hunk(old_start_at, new_start_at, hunk_lines)
410276
def next(self):
        
        if self._has_finished:
            raise StopIteration

        if not len(self._buffer):
                    
            results = self.fetch_next_block()
            self._buffer.extend(results)
            
        if not len(self._buffer):
            raise StopIteration
            
        return self._buffer.popleft()