Insert the data from the clipboard.
329814
def paste_clipboard_data(self, data, paste_mode=PasteMode.EMACS, count=1):
        
        assert isinstance(data, ClipboardData)
        assert paste_mode in (PasteMode.VI_BEFORE, PasteMode.VI_AFTER, PasteMode.EMACS)

        original_document = self.document
        self.document = self.document.paste_clipboard_data(data, paste_mode=paste_mode, count=count)

        # Remember original document. This assignment should come at the end,
        # because assigning to 'document' will erase it.
        self.document_before_paste = original_document
653475
def Copy_to_Clipboard(self, event=None):
        ""
        bmp_obj = wx.BitmapDataObject()
        bmp_obj.SetBitmap(self.bitmap)

        if not wx.TheClipboard.IsOpened():
           open_success = wx.TheClipboard.Open()
           if open_success:
              wx.TheClipboard.SetData(bmp_obj)
              wx.TheClipboard.Close()
              wx.TheClipboard.Flush()
674358
def _insert_data(self, name, value, timestamp, interval, config, **kwargs):
    ''''''
    kwargs = {
      'name'        : name,
      'interval'    : interval,
      'insert_time' : time.time(),
      'i_time'      : config['i_calc'].to_bucket(timestamp),
      'value'       : value
    }
    if not config['coarse']:
      kwargs['r_time'] = config['r_calc'].to_bucket(timestamp)
    stmt = self._table.insert().values(**kwargs)
    conn = self._client.connect()
    result = conn.execute(stmt)
237015
def insertLine(self, i) :
		""""""
		self.data.insert(i, CSVEntry(self))
		return self.lines[i]
1030882
public static void copyToClipboard(String string) {
        ClipboardContent content = new ClipboardContent();
        content.putString(string);
        Clipboard.getSystemClipboard().setContent(content);
        logger.info("copy '" + string + "' to clipboard");
    }
5868
def insert_string(self, data):
        

        # First split string into lines
        lines = data.split('\n')

        while lines:
            line = lines[0]
            del lines[0]

            # Skip empty line
            if not line:
                continue

            # Skip comments
            if comment_re.match(line):
                continue

            # Handle continued lines
            while line[-1] == '\\':
                if lines:
                    line = line[:-1] + lines[0]
                    del lines[0]
                else:
                    line = line[:-1]
                    break

            # Split line into resource and value
            m = resource_spec_re.match(line)

            # Bad line, just ignore it silently
            if not m:
                continue

            res, value = m.group(1, 2)

            # Convert all escape sequences in value
            splits = value_escape_re.split(value)

            for i in range(1, len(splits), 2):
                s = splits[i]
                if len(s) == 3:
                    splits[i] = chr(int(s, 8))
                elif s == 'n':
                    splits[i] = '\n'

            # strip the last value part to get rid of any
            # unescaped blanks
            splits[-1] = splits[-1].rstrip()

            value = ''.join(splits)

            self.insert(res, value)
1321971
def paste_buffer(pymux, variables):
    
    pane = pymux.arrangement.get_active_pane()
    pane.process.write_input(get_app().clipboard.get_data().text, paste=True)
715374
def copy(self):
        """"""
        cliptxt = self._sel_to_text( self.selectedIndexes() )
        clipboard = QApplication.clipboard()
        clipboard.setText(cliptxt)
14708
private void addContents(String text) {

        int firstColSelected = table.getSelectedColumn();
        int firstRowSelected = table.getSelectedRow();
        int temp = firstColSelected;

        if (firstColSelected == -1 || firstRowSelected == -1) {
            return;
        }
        ArrayList<ArrayList<String>> clipboard = parseString(text);
        for (int i = 0; i < clipboard.size(); i++) {
            for (int j = 0; j < clipboard.get(i).size(); j++) {
                try {
                    table.getModel().setValueAt(clipboard.get(i).get(j), firstRowSelected, temp++);
                } catch (Exception e) {
                }
            }
            temp = firstColSelected;
            firstRowSelected++;
        }
    }
803632
def set_clipboard(self, data, datatype="text"):
        

        error_log = []

        if datatype == "text":
            clip_data = wx.TextDataObject(text=data)

        elif datatype == "bitmap":
            clip_data = wx.BitmapDataObject(bitmap=data)

        else:
            msg = _("Datatype {type} unknown").format(type=datatype)
            raise ValueError(msg)

        if self.clipboard.Open():
            self.clipboard.SetData(clip_data)
            self.clipboard.Close()
        else:
            wx.MessageBox(_("Can't open the clipboard"), _("Error"))

        return error_log
1356895
def _copyDPToClipboard(self):
        """"""
        dp = self._dp_menu_on
        if dp and dp.archived:
            path = dp.fullpath.replace(" ", "\\ ")
            QApplication.clipboard().setText(path, QClipboard.Clipboard)
            QApplication.clipboard().setText(path, QClipboard.Selection)
1249515
def insert(self, s):
        '''
        
        '''
        for c in s:
            self.text.insert(self.cursor_loc, c)
            self.cursor_loc += 1
800851
def insert_completion(self, p_insert):
        
        start, end = self._surrounding_text
        final_text = start + p_insert + end
        self.set_edit_text(final_text)
        self.set_edit_pos(len(start) + len(p_insert))
97516
def add_text(self, text):
        """"""
        index = self.findText(text)
        while index != -1:
            self.removeItem(index)
            index = self.findText(text)
        self.insertItem(0, text)
        index = self.findText('')
        if index != -1:
            self.removeItem(index)
            self.insertItem(0, '')
            if text != '':
                self.setCurrentIndex(1)
            else:
                self.setCurrentIndex(0)
        else:
            self.setCurrentIndex(0)
342436
def put(text, cbname):
    
    global _lastSel
    _checkTkInit()
    if cbname == 'CLIPBOARD':
        _theRoot.clipboard_clear()
        if text:
            # for clipboard_append, kwds can be -displayof, -format, or -type
            _theRoot.clipboard_append(text)
        return
    if cbname == 'PRIMARY':
        _lastSel = text
        _theRoot.selection_handle(ch_handler, selection='PRIMARY')
        # we need to claim/own it so that ch_handler is used
        _theRoot.selection_own(selection='PRIMARY')
        # could add command arg for a func to be called when we lose ownership
        return
    raise RuntimeError("Unexpected clipboard name: "+str(cbname))
838169
def _insert_text_buf(self, line, idx):
        """"""
        self._bytes_012[idx] = 0
        self._bytes_345[idx] = 0
        # Crop text if necessary
        I = np.array([ord(c) - 32 for c in line[:self._n_cols]])
        I = np.clip(I, 0, len(__font_6x8__)-1)
        if len(I) > 0:
            b = __font_6x8__[I]
            self._bytes_012[idx, :len(I)] = b[:, :3]
            self._bytes_345[idx, :len(I)] = b[:, 3:]
1281370
def copy_to_clipboard(dat):
    
    p = subprocess.Popen(['pbcopy'], stdin=subprocess.PIPE)
    p.stdin.write(to_bytes(dat))
    p.stdin.close()
    p.communicate()