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

Method selection_get

Lib/tkinter/__init__.py:1108–1124  ·  view source on GitHub ↗

Return the contents of the current X selection. A keyword parameter selection specifies the name of the selection and defaults to PRIMARY. A keyword parameter displayof specifies a widget on the display to use. A keyword parameter type specifies the form of data to

(self, **kw)

Source from the content-addressed store, hash-verified

1106 self.tk.call(('selection', 'clear') + self._options(kw))
1107
1108 def selection_get(self, **kw):
1109 """Return the contents of the current X selection.
1110
1111 A keyword parameter selection specifies the name of
1112 the selection and defaults to PRIMARY. A keyword
1113 parameter displayof specifies a widget on the display
1114 to use. A keyword parameter type specifies the form of data to be
1115 fetched, defaulting to STRING except on X11, where UTF8_STRING is tried
1116 before STRING."""
1117 if 'displayof' not in kw: kw['displayof'] = self._w
1118 if 'type' not in kw and self._windowingsystem == 'x11':
1119 try:
1120 kw['type'] = 'UTF8_STRING'
1121 return self.tk.call(('selection', 'get') + self._options(kw))
1122 except TclError:
1123 del kw['type']
1124 return self.tk.call(('selection', 'get') + self._options(kw))
1125
1126 def selection_handle(self, command, **kw):
1127 """Specify a function COMMAND to call if the X

Callers

nothing calls this directly

Calls 2

_optionsMethod · 0.95
callMethod · 0.45

Tested by

no test coverage detected