def copy(text): """Add text onto clipList. Empty |text| is not stored.""" if text and len(text): global clipList clipList.append(text) if clipboard.copy: clipboard.copy(text)
def copyToClipboard(display, cmdIndex): self.assertTrue(clipboard.copy, callerText) while True: # Python 2.7 will sometimes fail this copy call. Keep trying. try: clipboard.copy(text) return app.curses_util.CTRL_V except OSError: pass
def copyToClipboard(display, cmdIndex): self.assertTrue(clipboard.copy, callerText) clipboard.copy(text) return app.curses_util.CTRL_V
def copyToClipboard(display, cmdIndex): self.assertTrue(clipboard.copy, callerText) clipboard.copy(text) return None
def copyToClipboard(display, cmdIndex): self.assertTrue(clipboard.copy) # Check that copy exists. clipboard.copy(text) return CTRL_V
def copy(self, text): """Add text onto clipList. Empty |text| is not stored.""" if text and len(text): self._clipList.append(text) if clipboard.copy: clipboard.copy(text)