write a memory location.
        By default the transfer size is a word
345615
def write_memory(self, addr, value, transfer_size=32):
        
        self.ap.write_memory(addr, value, transfer_size)
952473
def write(self, word):
		
		bytes_ = int_to_bytes(word, self.width)
		self.open_stream_out.write(bytes_)
183096
private int writeAtMost(ByteBuffer data, int offset, int length)
    {
        if (current >= bufferOffset + buffer.length)
            reBuffer();

        assert current < bufferOffset + buffer.length
        : String.format("File (%s) offset %d, buffer offset %d.", getPath(), current, bufferOffset);


        int toCopy = Math.min(length, buffer.length - bufferCursor());

        // copy bytes from external buffer
        ByteBufferUtil.arrayCopy(data, offset, buffer, bufferCursor(), toCopy);

        assert current <= bufferOffset + buffer.length
        : String.format("File (%s) offset %d, buffer offset %d.", getPath(), current, bufferOffset);

        validBufferBytes = Math.max(validBufferBytes, bufferCursor() + toCopy);
        current += toCopy;

        return toCopy;
    }
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:]
1043540
def write(self, output='', flush=True, position=0):
        

        if self.enabled:

            term = self.term
            stream = self.stream

            try:
                term.move_to(0, term.height - position)
                # Include \r and term call to cover most conditions
                if NEEDS_UNICODE_HELP:  # pragma: no cover (Version dependent 2.6)
                    encoding = stream.encoding or 'UTF-8'
                    stream.write(('\r' + term.clear_eol + output).encode(encoding))
                else:  # pragma: no cover (Version dependent >= 2.7)
                    stream.write('\r' + term.clear_eol + output)

            finally:
                # Reset position and scrolling
                self._set_scroll_area()
                if flush:
                    stream.flush()
818158
def write_empty(self, size):
        """"""
        if size < 1:
            return
        self._fh.seek(size-1, 1)
        self._fh.write(b'\x00')
284855
def write(self, address, size, value):
        
        for i in range(0, size):
            self.__write_byte(address + i, (value >> (i * 8)) & 0xff)
1214312
def OnOpenMemory(self, event):
        """"""
        dialog = wx.FileDialog(self, style=wx.OPEN)
        if dialog.ShowModal() == wx.ID_OK:
            path = dialog.GetPath()
            if self.loader:
                # we've already got a displayed data-set, open new window...
                frame = MainFrame()
                frame.Show(True)
                frame.load_memory(path)
            else:
                self.load_memory(path)
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
722140
def write(self, i, value):
        
        # Current byte position - (n * data_size)
        offset = i * self.__strct.size

        # Set file pointer to -(#data)
        self.__file.seek(offset)

        # Pack value
        data = self.pack(value)

        # Write packed value
        self.__file.write(data)
1301104
def as_ab_write(self, start, data):
        
        wordlen = snap7.snap7types.S7WLByte
        type_ = snap7.snap7types.wordlen_to_ctypes[wordlen]
        size = len(data)
        cdata = (type_ * size).from_buffer_copy(data)
        logger.debug("ab write: start: %s: size: %s: " % (start, size))
        return self.library.Cli_AsABWrite(
            self.pointer, start, size, byref(cdata))
448919
def program_word(self, offset, word):
		
		if(offset >= self.size):
			raise AddressError("Offset({}) not in address space({})".format(offset, self.size))
		self.repr_[offset].setvalue(word)
1230260
private int writeAtMost(byte[] b, int off, int len) throws IOException {
    if (this.curr_ >= this.hi_) {
      if (this.hitEOF_ && this.hi_ < this.maxHi_) {
        // at EOF -- bump "hi"
        this.hi_ = this.maxHi_;
      } else {
        // slow path -- write current buffer; read next one
        this.seek(this.curr_);
        if (this.curr_ == this.hi_) {
          // appending to EOF -- bump "hi"
          this.hi_ = this.maxHi_;
        }
      }
    }
    len = Math.min(len, (int) (this.hi_ - this.curr_));
    int buffOff = (int) (this.curr_ - this.lo_);
    System.arraycopy(b, off, this.buff_, buffOff, len);
    this.curr_ += len;
    return len;
  }
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
758390
def copy(self, _):
        
        #l.debug("Copying %d bytes of memory with id %s." % (len(self.mem), self.id))
        c = SimSymbolicDbgMemory(
            mem=self.mem.branch(),
            memory_id=self.id,
            endness=self.endness,
            abstract_backer=self._abstract_backer,
            read_strategies=[ s.copy() for s in self.read_strategies ],
            write_strategies=[ s.copy() for s in self.write_strategies ],
            stack_region_map=self._stack_region_map,
            generic_region_map=self._generic_region_map
        )

        return c
371201
def write(self, data):
        

        # report_size = 64
        # if self.ep_out:
        #     report_size = self.ep_out.wMaxPacketSize
        #
        # for _ in range(report_size - len(data)):
        #    data.append(0)

        self.read_sem.release()

        if not self.ep_out:
            bmRequestType = 0x21       #Host to device request of type Class of Recipient Interface
            bmRequest = 0x09           #Set_REPORT (HID class-specific request for transferring data over EP0)
            wValue = 0x200             #Issuing an OUT report
            wIndex = self.intf_number  #mBed Board interface number for HID
            self.dev.ctrl_transfer(bmRequestType, bmRequest, wValue, wIndex, data)
            return
            #raise ValueError('EP_OUT endpoint is NULL')

        self.ep_out.write(data)
        #logging.debug('sent: %s', data)
        return
132868
def write_str(self, s):
        """"""
        self.write(s)
        self.room -= len(s)