MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / selection_get

Method selection_get

tools/python-3.11.9-amd64/Lib/tkinter/__init__.py:1013–1029  ·  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 dat

(self, **kw)

Source from the content-addressed store, hash-verified

1011 self.tk.call(('selection', 'clear') + self._options(kw))
1012
1013 def selection_get(self, **kw):
1014 """Return the contents of the current X selection.
1015
1016 A keyword parameter selection specifies the name of
1017 the selection and defaults to PRIMARY. A keyword
1018 parameter displayof specifies a widget on the display
1019 to use. A keyword parameter type specifies the form of data to be
1020 fetched, defaulting to STRING except on X11, where UTF8_STRING is tried
1021 before STRING."""
1022 if 'displayof' not in kw: kw['displayof'] = self._w
1023 if 'type' not in kw and self._windowingsystem == 'x11':
1024 try:
1025 kw['type'] = 'UTF8_STRING'
1026 return self.tk.call(('selection', 'get') + self._options(kw))
1027 except TclError:
1028 del kw['type']
1029 return self.tk.call(('selection', 'get') + self._options(kw))
1030
1031 def selection_handle(self, command, **kw):
1032 """Specify a function COMMAND to call if the X

Callers 2

Calls 2

_optionsMethod · 0.95
callMethod · 0.80

Tested by 2