Write a word (two bytes) value to a device's register.
493022
def write_wdata(self, address, register, value):
        
        warnings.warn("write_wdata() is deprecated and will be removed in future versions replace with write_word_data()", DeprecationWarning)
        LOGGER.debug("Writing word data %s to register %s on device %s",
            bin(value), hex(register), hex(address))
        return self.driver.write_word_data(address, register, value)
980978
def write_byte(self, i2c_addr, value, force=None):
        
        self._set_address(i2c_addr, force=force)
        msg = i2c_smbus_ioctl_data.create(
            read_write=I2C_SMBUS_WRITE, command=value, size=I2C_SMBUS_BYTE
        )
        ioctl(self.fd, I2C_SMBUS, msg)
656231
def write_word_at(self, index: int, value: Union[int, BitVec, bool, Bool]) -> None:
        
        try:
            # Attempt to concretize value
            if isinstance(value, bool):
                _bytes = (
                    int(1).to_bytes(32, byteorder="big")
                    if value
                    else int(0).to_bytes(32, byteorder="big")
                )
            else:
                _bytes = util.concrete_int_to_bytes(value)
            assert len(_bytes) == 32
            self[index : index + 32] = list(bytearray(_bytes))
        except (Z3Exception, AttributeError):  # BitVector or BoolRef
            value = cast(Union[BitVec, Bool], value)
            if isinstance(value, Bool):
                value_to_write = If(
                    value,
                    symbol_factory.BitVecVal(1, 256),
                    symbol_factory.BitVecVal(0, 256),
                )
            else:
                value_to_write = value
            assert value_to_write.size() == 256

            for i in range(0, value_to_write.size(), 8):
                self[index + 31 - (i // 8)] = Extract(i + 7, i, value_to_write)
747538
def writeQword(self, qword):
        
        self.data.write(pack(self.endianness + ("Q" if not self.signed else "q"),  qword))
1059424
def write_crc32(fo, bytes):
    """"""
    data = crc32(bytes) & 0xFFFFFFFF
    fo.write(pack('>I', data))
742518
def _write8(self, reg, value):
        """"""
        self.i2c.write8(TCS34725_COMMAND_BIT | reg, value)
1369512
def write_uint32(self, value, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.pack('%sI' % endian, value)
798623
def write_byte(self, address, data):
        
        buf = [
            self.WriteCommandWord,
            address // 256,
            address % 256,
            self.EndMark,
            self.WriteCommandWord,
            data,
            0,
            self.EndMark,
            ]
        if not self.dev.write_data(buf):
            return False
        buf = self.dev.read_data(8)
        if buf is None:
            return False
        for byte in buf:
            if byte != 0xA5:
                return False
        return True
209535
def write_int16(self, value, little_endian=True):
        
        if little_endian:
            endian = "<"
        else:
            endian = ">"
        return self.pack('%sh' % endian, value)
798816
def write(self, data):
        
        try:
            # Hack to support unicode under Python 2.x
            if isinstance(data, str) or (sys.version_info < (3,) and isinstance(data, unicode)):
                data = data.encode('utf-8')

            self._device.write(data)

        except serial.SerialTimeoutException:
            pass

        except serial.SerialException as err:
            raise CommError('Error writing to device.', err)

        else:
            self.on_write(data=data)
760229
def write(self, name, data):
        """"""
        if isinstance(data, StringIO):
            self.zf.writestr(name, data.getvalue())
        else:
            self.zf.writestr(name, to_utf8(data))
779758
def set_raw_holding_register(self, name, value):
        """"""
        self._conn.write_register(
            unit=self._slave,
            address=(self._holding_regs[name]['addr']),
            value=value)
1208453
def write(self, out):
        """"""
        out.write_string(self.cpu, len(self.cpu))
        out.write_string(self.os, len(self.os))
96742
def write_bytes(self, bytes, append=False):
        
        if append:
            mode = 'ab'
        else:
            mode = 'wb'
        with self.open(mode) as f:
            f.write(bytes)
512159
function writeKeys(mnemonic_phrase, deviceTempPrivKey, devicePrevTempPrivKey, onDone){
	var keys = {
		mnemonic_phrase: mnemonic_phrase,
		temp_priv_key: deviceTempPrivKey.toString('base64'),
		prev_temp_priv_key: devicePrevTempPrivKey.toString('base64')
	};
	fs.writeFile(KEYS_FILENAME, JSON.stringify(keys, null, '\t'), 'utf8', function(err){
		if (err)
			throw Error("failed to write keys file");
		if (onDone)
			onDone();
	});
}
1104984
def write (self, data):
        """"""
        self.tmpbuf.append(data)
        self.pos += len(data)
615110
def write(self, ulBuffer, pSrc, unBytes):
        """"""

        fn = self.function_table.write
        result = fn(ulBuffer, pSrc, unBytes)
        return result