MCPcopy Create free account
hub / github.com/ipython/ipython / clipboard_get

Function clipboard_get

IPython/core/hooks.py:173–190  ·  view source on GitHub ↗

Get text from the clipboard.

(self)

Source from the content-addressed store, hash-verified

171
172
173def clipboard_get(self):
174 """ Get text from the clipboard.
175 """
176 from ..lib.clipboard import (
177 osx_clipboard_get, tkinter_clipboard_get,
178 win32_clipboard_get
179 )
180 if sys.platform == 'win32':
181 chain = [win32_clipboard_get, tkinter_clipboard_get]
182 elif sys.platform == 'darwin':
183 chain = [osx_clipboard_get, tkinter_clipboard_get]
184 else:
185 chain = [tkinter_clipboard_get]
186 dispatcher = CommandChainDispatcher()
187 for func in chain:
188 dispatcher.add(func)
189 text = dispatcher()
190 return text

Callers

nothing calls this directly

Calls 2

addMethod · 0.95

Tested by

no test coverage detected