Write the given text to our wrapped stream, stripping any ANSI
        sequences from the text, and optionally converting them into win32
        calls.
19775
def write_and_convert(self, text):
        '''
        
        '''
        cursor = 0
        for match in self.ANSI_RE.finditer(text):
            start, end = match.span()
            self.write_plain_text(text, cursor, start)
            self.convert_ansi(*match.groups())
            cursor = end
        self.write_plain_text(text, cursor, len(text))
1218929
def Write(self, Text):
        
        self.Application._Alter('WRITE', '%s %s' % (self.Handle, tounicode(Text)))
1362627
def writeline(self, text):
        """"""
        log.debug('writing line %r' % text)
        self.write(text+chr(10))
5778
async def stream_as_text(stream):
    
    async for data in stream:
        if not isinstance(data, six.text_type):
            data = data.decode('utf-8', 'replace')
        yield data
958149
def write(self, writer: WriteStream) -> None:
        
        for part in self._raw:
            writer.write(bytes(part))
377492
function wt(file, text, flag) {
      if (flag === void 0) { flag = 'w'; }
      fs.writeFileSync(file, text, { encoding: 'utf8', flag: flag });
    }
1338649
public void writeln(String text) throws IOException {
		this.writer.write(text);
		if (text != null && text.length() > 0) {
			this.writer.write("\n"); //$NON-NLS-1$
		}
	}
294581
def write(self, text, flush=False, error=False, prompt=False):
        """"""
        if prompt:
            self.flush()
        if not is_string(text):
            # This test is useful to discriminate QStrings from decoded str
            text = to_text_string(text)
        self.__buffer.append(text)
        ts = time.time()
        if flush or prompt:
            self.flush(error=error, prompt=prompt)
        elif ts - self.__timestamp > 0.05:
            self.flush(error=error)
            self.__timestamp = ts
            # Timer to flush strings cached by last write() operation in series
            self.__flushtimer.start(50)
642695
def write(self, text):
        """"""
        index = text.find('\n')
        if index == -1:
            self._buffer = self._buffer + text
        else:
            self._buffer = self._buffer + text[:index + 1]
            if self._pattern:
                # pattern already compiled no need to check
                result = re.search(self._pattern, self._buffer)
                if result:
                    for group in result.groups():
                        if group:
                            self._buffer = self._buffer.replace(group, "***")
            self._file.write(self._buffer)
            self._file.flush()
            self._buffer = text[index + 1:]
1300115
def write(self, text, fg='black', bg='white'):
        ''''''
        if isinstance(text, str):
            sys.stdout.write(text)
        else:
            sys.stdout.write(str(text))
        sys.stdout.flush()
        if self.udp.connected():
            self.udp.writeln(text)
        if self.tcp.connected():
            self.tcp.writeln(text)
637603
public static void writeText(String text, File output) {
        PrintWriter pw = null;
        try {
            pw = new PrintWriter(new FileWriter(output));
            pw.write(text);
        } catch (Exception e) {
            throw new MockitoException("Problems writing text to file: " + output, e);
        } finally {
            close(pw);
        }
    }
1296176
def write(self, text, fg='black', bg='white'):
        ''''''
        try:
            self.parent_pipe_send.send(Text(text, fg, bg))
        except Exception:
            pass
1311052
public static void write(Path self, String text) throws IOException {
        Writer writer = null;
        try {
            writer = new OutputStreamWriter(Files.newOutputStream(self), Charset.defaultCharset());
            writer.write(text);
            writer.flush();

            Writer temp = writer;
            writer = null;
            temp.close();
        } finally {
            closeWithWarning(writer);
        }
    }
617525
function(data, encoding, callback) {
    if (this.error) {
      if (callback) {
        callback(error);
      }
      throw error;
    } else {
      return this.stream.write(data, encoding, callback);
    }
  }
783623
public void writeCharacters(char[] text, int start, int len)
			throws XMLStreamException {
		this.writeCharacters(new String(text, start, len));
	}
954127
def write_to(output, txt):
    """"""
    if (isinstance(txt, six.binary_type) or six.PY3 and isinstance(output, StringIO)) or isinstance(output, TextIOWrapper):
        output.write(txt)
    else:
        output.write(txt.encode("utf-8", "replace"))
242314
def write_text(_command, txt_file):
    """"""
    command = _command.strip()
    with open(txt_file, 'w') as txt:
        txt.writelines(command)