Write bytes to the pseudoterminal.
        
        Returns the number of bytes written.
966463
def write(self, s, flush=True):
        
        return self._writeb(s, flush=flush)
299920
def write_byte(self, addr, data, erase=True):
        
        if addr < 0 or addr >= 128:
            raise ValueError("invalid byte address")
        log.debug("write byte at address {0} ({0:02X}h)".format(addr))
        cmd = "\x53" if erase is True else "\x1A"
        cmd = cmd + chr(addr) + chr(data) + self.uid
        return self.transceive(cmd)
877216
def dispatch_write(self, buf):
        """"""
        self.write_buffer += buf
        if len(self.write_buffer) > self.MAX_BUFFER_SIZE:
            console_output('Buffer too big ({:d}) for {}\n'.format(
                len(self.write_buffer), str(self)).encode())
            raise asyncore.ExitNow(1)
        return True
878146
def write_short(self, n, pack=Struct('>H').pack):
        
        if 0 <= n <= 0xFFFF:
            self._output_buffer.extend(pack(n))
        else:
            raise ValueError('Short %d out of range 0..0xFFFF', n)
        return self
1140799
def __write(self, s):
        
        self.buf += s
        while len(self.buf) > self.bufsize:
            self.fileobj.write(self.buf[:self.bufsize])
            self.buf = self.buf[self.bufsize:]
140683
def write(self, b):
        """"""

        if not isinstance(b, _BINARY_TYPES):
            raise TypeError(
                "input must be one of %r, got: %r" % (_BINARY_TYPES, type(b)))

        self._buf.write(b)
        self._total_bytes += len(b)

        if self._buf.tell() >= self._min_part_size:
            self._upload_next_part()

        return len(b)
289906
def write_bit(self, b, pack=Struct('B').pack):
        '''
        
        '''
        self._output_buffer.append(pack(True if b else False))
        return self
1005332
def write_bytes(fo, datum, schema=None):
    """"""
    write_long(fo, len(datum))
    fo.write(datum)
244755
def write_long(self, n, pack=Struct('>I').pack):
        
        if 0 <= n <= 0xFFFFFFFF:
            self._output_buffer.extend(pack(n))
        else:
            raise ValueError('Long %d out of range 0..0xFFFFFFFF', n)
        return self
1345127
def write(self, buf):
        """"""
        return self.transport_sock.sendto(
            buf,
            (self.transport_host, self.transport_port)
        )
284855
def write(self, address, size, value):
        
        for i in range(0, size):
            self.__write_byte(address + i, (value >> (i * 8)) & 0xff)
1271739
public void writeShort(int pShort) throws IOException {
        out.write(pShort & 0xFF);
        out.write((pShort >>> 8) & 0xFF);
        bytesWritten += 2;
    }
218439
def _write_bytes(stream: Union[StdSim, TextIO], to_write: bytes) -> None:
        
        try:
            stream.buffer.write(to_write)
        except BrokenPipeError:
            # This occurs if output is being piped to a process that closed
            pass
1289428
def write(self, len, buf):
        
        ret = libxml2mod.xmlOutputBufferWrite(self._o, len, buf)
        return ret
15932
def writeBytes(self, b):
        
        self.stream.write(TYPE_STRING)

        self.serialiseBytes(b)
78022
def write_length_and_key(fp, value):
    
    written = write_fmt(fp, 'I', 0 if value in _TERMS else len(value))
    written += write_bytes(fp, value)
    return written
190963
public final int writeTo(final OutputStream os,int offset, int maxWriteSize) throws IOException {
        int bytesToWrite = Math.min(blobReference.getBytes().length - offset, maxWriteSize);
        os.write(blobReference.getBytes(), offset, blobReference.getBytes().length);
        return bytesToWrite;
    }