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

Method clipboard_get

Lib/tkinter/__init__.py:1000–1021  ·  view source on GitHub ↗

Retrieve data from the clipboard on window's display. The window keyword defaults to the root window of the Tkinter application. The type keyword specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME.

(self, **kw)

Source from the content-addressed store, hash-verified

998
999 # Clipboard handling:
1000 def clipboard_get(self, **kw):
1001 """Retrieve data from the clipboard on window's display.
1002
1003 The window keyword defaults to the root window of the Tkinter
1004 application.
1005
1006 The type keyword specifies the form in which the data is
1007 to be returned and should be an atom name such as STRING
1008 or FILE_NAME. Type defaults to STRING, except on X11, where the default
1009 is to try UTF8_STRING and fall back to STRING.
1010
1011 This command is equivalent to:
1012
1013 selection_get(CLIPBOARD)
1014 """
1015 if 'type' not in kw and self._windowingsystem == 'x11':
1016 try:
1017 kw['type'] = 'UTF8_STRING'
1018 return self.tk.call(('clipboard', 'get') + self._options(kw))
1019 except TclError:
1020 del kw['type']
1021 return self.tk.call(('clipboard', 'get') + self._options(kw))
1022
1023 def clipboard_clear(self, **kw):
1024 """Clear the data in the Tk clipboard.

Callers

nothing calls this directly

Calls 2

_optionsMethod · 0.95
callMethod · 0.45

Tested by

no test coverage detected