Convenience function to write to the transport
504027
def _write_transport(self, string):
        """"""
        if isinstance(string, str):  # we need to convert to bytes
            self.transport.write(string.encode('utf-8'))
        else:
            self.transport.write(string)
450615
def Write(self, data):
        """"""
        self._Send(b'WRTE', arg0=self.local_id, arg1=self.remote_id, data=data)
        # Expect an ack in response.
        cmd, okay_data = self.ReadUntil(b'OKAY')
        if cmd != b'OKAY':
            if cmd == b'FAIL':
                raise usb_exceptions.AdbCommandFailureException(
                    'Command failed.', okay_data)
            raise InvalidCommandError(
                'Expected an OKAY in response to a WRITE, got %s (%s)',
                cmd, okay_data)
        return len(data)
66549
def _Write(self, data, length, progress_callback=None):
        """"""
        if progress_callback:
            progress = self._HandleProgress(length, progress_callback)
            next(progress)
        while length:
            tmp = data.read(self.chunk_kb * 1024)
            length -= len(tmp)
            self.usb.BulkWrite(tmp)

            if progress_callback and progress:
                progress.send(len(tmp))
924699
function _writeBufferToPort(buffer, transactionId) {
    var transaction = this._transactions[transactionId];

    this._port.write(buffer);
    if (transaction) {
        transaction._timeoutFired = false;
        transaction._timeoutHandle = _startTimeout(this._timeout, transaction);
    }
}
966463
def write(self, s, flush=True):
        
        return self._writeb(s, flush=flush)
1143624
def _perform_write(self, addr, data):
        """"""
        return self._machine_controller.write(addr, data, self._x, self._y, 0)
393996
def write_eof(self):
        
        self._check_writable()
        self._transport._can_write.wait()
        self._transport.write_eof()
802270
function write (type, port) {
  return createAction(WRITE, writeCommand)

  /**
   * function that returns a write actions
   * @private
   * @param  {string} command
   * @param  {object} opts    move object
   * @return {object}         write action object
   */
  function writeCommand (command, opts) {
    return {
      type: type,
      command: command,
      opts: opts,
      port: port
    }
  }
}
1328222
function write (to, what, locals) {
  const content = ejs.render(what, _.extend({}, (locals || {}), { S: underscoreString }))
  return mkdirp(path.dirname(to)).then(() => {
    return fs.writeFileAsync(to, content, 'utf8')
  })
}
254080
def dispatch_write(self, buf):
        """"""
        if self.state != STATE_DEAD and self.enabled:
            super().dispatch_write(buf)
            return True
        return False
1275426
def _write(self, request):
    """"""
    with sw("serialize_request"):
      request_str = request.SerializeToString()
    with sw("write_request"):
      with catch_websocket_connection_errors():
        self._sock.send(request_str)
60144
def write(self, data):
        """"""
        for chunk in chunks(data, 512):
            self.wait_to_write()
            self.comport.write(chunk)
        self.comport.flush()
1012321
def connectionMade(self):
        
        cmd = self.sm.connect()
        self.transport.write(cmd)
960642
def _write(self, cmd, *datas):
        """"""
        cmd = Command(write=cmd)
        cmd.write(self._transport, self._protocol, *datas)
615110
def write(self, ulBuffer, pSrc, unBytes):
        """"""

        fn = self.function_table.write
        result = fn(ulBuffer, pSrc, unBytes)
        return result
250862
def write_data(self, data, response_required=None, timeout=5.0, raw=False):
        """"""
        if self._transport is None:
            return

        if self._paused:
            return

        if self._waiting_for_response:
            LOG.debug("queueing write %s", data)
            self._queued_writes.append((data, response_required, timeout))
            return

        if response_required:
            self._waiting_for_response = response_required
            if timeout > 0:
                self._timeout_task = self.loop.call_later(
                    timeout, self._response_required_timeout)

        if not raw:
            cksum = 256 - reduce(lambda x, y: x+y, map(ord, data)) % 256
            data = data + '{:02X}'.format(cksum)
            if int(data[0:2], 16) != len(data)-2:
                LOG.debug("message length wrong: %s", data)

        LOG.debug("write_data '%s'", data)
        self._transport.write((data + '\r\n').encode())
1059699
def write_packet(sock, data, already_pickled=False):
    """"""
    if already_pickled:
        sent_data = data
    else:
        sent_data = pickle.dumps(data, PICKLE_HIGHEST_PROTOCOL)
    sent_data = struct.pack("l", len(sent_data)) + sent_data
    nsend = len(sent_data)
    while nsend > 0:
        nsend -= temp_fail_retry(socket.error, sock.send, sent_data)