MCPcopy Index your code
hub / github.com/ipython/ipython / clipboard_get

Function clipboard_get

IPython/core/hooks.py:139–158  ·  view source on GitHub ↗

Get text from the clipboard.

(self)

Source from the content-addressed store, hash-verified

137
138
139def clipboard_get(self):
140 """ Get text from the clipboard.
141 """
142 from ..lib.clipboard import (
143 osx_clipboard_get,
144 tkinter_clipboard_get,
145 win32_clipboard_get,
146 wayland_clipboard_get,
147 )
148 if sys.platform == 'win32':
149 chain = [win32_clipboard_get, tkinter_clipboard_get]
150 elif sys.platform == 'darwin':
151 chain = [osx_clipboard_get, tkinter_clipboard_get]
152 else:
153 chain = [wayland_clipboard_get, tkinter_clipboard_get]
154 dispatcher = CommandChainDispatcher()
155 for func in chain:
156 dispatcher.add(func)
157 text = dispatcher()
158 return text

Callers

nothing calls this directly

Calls 2

addMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…