summaryrefslogtreecommitdiffstats
path: root/Lib/lib-tk/Tkinter.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-04-16 20:55:38 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-04-16 20:55:38 (GMT)
commit0db2a989f3b861eae80959d26dae9fcdac4dde96 (patch)
tree8c612e55e55a7663832e004f8739deab9c2e91fc /Lib/lib-tk/Tkinter.py
parent45bb98e8b912bb970bddd87ca850cdde7e271d35 (diff)
downloadcpython-0db2a989f3b861eae80959d26dae9fcdac4dde96.zip
cpython-0db2a989f3b861eae80959d26dae9fcdac4dde96.tar.gz
cpython-0db2a989f3b861eae80959d26dae9fcdac4dde96.tar.bz2
Patch #1063914: Add clipboard_get.
Diffstat (limited to 'Lib/lib-tk/Tkinter.py')
-rw-r--r--Lib/lib-tk/Tkinter.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/Lib/lib-tk/Tkinter.py b/Lib/lib-tk/Tkinter.py
index 5bd7aa9..303c22d 100644
--- a/Lib/lib-tk/Tkinter.py
+++ b/Lib/lib-tk/Tkinter.py
@@ -483,7 +483,24 @@ class Misc:
def bell(self, displayof=0):
"""Ring a display's bell."""
self.tk.call(('bell',) + self._displayof(displayof))
+
# Clipboard handling:
+ def clipboard_get(self, **kw):
+ """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. Type defaults to STRING.
+
+ This command is equivalent to:
+
+ selection_get(CLIPBOARD)
+ """
+ return self.tk.call(('clipboard', 'get') + self._options(kw))
+
def clipboard_clear(self, **kw):
"""Clear the data in the Tk clipboard.