Add one or more newlines before the next write.
774804
def newline(self, node=None, extra=0):
        """"""
        self._new_lines = max(self._new_lines, 1 + extra)
        if node is not None and node.lineno != self._last_line:
            self._write_debug_info = node.lineno
            self._last_line = node.lineno
1010416
def write(self, x):
        """"""
        if self._new_lines:
            if not self._first_write:
                self.stream.write('\n' * self._new_lines)
                self.code_lineno += self._new_lines
                if self._write_debug_info is not None:
                    self.debug_info.append((self._write_debug_info,
                                            self.code_lineno))
                    self._write_debug_info = None
            self._first_write = False
            self.stream.write('    ' * self._indentation)
            self._new_lines = 0
        self.stream.write(x)
266923
def overwrite_line(self, n, text):
        
        with self._moveback(n):
            self.term.stream.write(text)
459474
def multiline_push(self, code, lines):
        """"""
        for line in lines[:-1]:
            answer = '%s-%s' % (code, line)
            self.push(answer)
        self.push(code, lines[-1])
1310968
public function addNewLineAfterOpeningParentheses()
    {
        if (false === $this->parentheses->getInlineParentheses()) {
            $this->indentation->setIncreaseBlockIndent(true);
            $this->newline = true;
        }
    }
1191616
def _changeMs(self, line):
        """"""
        # use the position of the last space instead
        try:
            last_space_pos = line.rindex(' ')
        except ValueError:
            return line
        else:
            end_str = line[last_space_pos:]
            new_string = line
            if end_str[-2:] == 'ms' and int(end_str[:-2]) >= 1000:
                # isolate the number of milliseconds
                ms = int(end_str[:-2])
                # create the new string with the beginning part of the
                # log with the new ms part added in
                new_string = (line[:last_space_pos] +
                              ' (' + self._msToString(ms) + ')' +
                              line[last_space_pos:])
            return new_string
295253
protected void writeNewLine(int indentation) throws XMLStreamException {
        final int newLineLength = getNewLine().length();
        final int prefixLength = newLineLength + (getIndent().length() * indentation);
        if (prefixLength > 0) {
            if (linePrefix == null) {
                linePrefix = (getNewLine() + getIndent()).toCharArray();
            }
            while (prefixLength > linePrefix.length) {
                // make linePrefix longer:
                char[] newPrefix = new char[newLineLength
                        + ((linePrefix.length - newLineLength) * 2)];
                System.arraycopy(linePrefix, 0, newPrefix, 0, linePrefix.length);
                System.arraycopy(linePrefix, newLineLength, newPrefix, linePrefix.length,
                        linePrefix.length - newLineLength);
                linePrefix = newPrefix;
            }
            out.writeCharacters(linePrefix, 0, prefixLength);
        }
    }
1287844
def _replace_lines(fn, startswith, new_line):
  """"""
  new_lines = []
  for line in open(fn):
    if line.startswith(startswith):
      new_lines.append(new_line)
    else:
      new_lines.append(line)
  with open(fn, 'w') as f:
    f.write('\n'.join(new_lines))
1265539
def add_seq(self, seq):
        """"""
        self.buffer.append(seq)
        self.buf_count += 1
        if self.buf_count % self.buffer_size == 0: self.flush()
924672
def puts(s='', newline=True, stream=STDOUT):
    """"""
    max_width_ctx = _get_max_width_context()
    if max_width_ctx:
        cols, separator = max_width_ctx[-1]
        s = max_width(s, cols, separator)

    if newline:
        s = tsplit(s, NEWLINES)
        s = map(str, s)
        indent = ''.join(INDENT_STRINGS)

        s = (str('\n' + indent)).join(s)

    _str = ''.join((
        ''.join(INDENT_STRINGS),
        str(s),
        '\n' if newline else ''
    ))
    stream(_str)
46326
def add_line(self, line, source, *lineno):
        """"""
        self.result.append(line, source, *lineno)
863364
def _write_line(self, text=''):
        
        if text:
            self._code += str(text) + "\n"
        else:
            self._code += "\n"
229297
def write_line(self, message):
        """"""

        self.out.write(message + "\n")
        self.out.flush()
235063
def indent(text, num=4):
    """"""
    str_indent = ' ' * num
    return str_indent + ('\n' + str_indent).join(text.splitlines())
508324
def newline(self, *args, **kwargs):
        
        levelOverride = kwargs.get('level') or self._lastlevel
        self._log(levelOverride, '', 'newline', args, kwargs)
474301
def write(self, more):
        """"""
        if more:
            self.output += str(more).upper()
            self.output += '\n'
16403
def indent(self, levels, first_line=None):
        """"""
        self._indentation_levels.append(levels)
        self._indent_first_line.append(first_line)