This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tkinter clipboard_get method (new in Tk 8.4)
Type: Stage:
Components: Tkinter Versions: Python 2.5
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: loewis Nosy List: jepler, loewis, mfranklin1
Priority: normal Keywords: patch

Created on 2004-11-10 16:07 by mfranklin1, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
CDIFF mfranklin1, 2004-11-10 16:07 created with diff -c TkinterOLD.py Tkinter.py on RH9
Messages (5)
msg47282 - (view) Author: Martin Franklin (mfranklin1) Date: 2004-11-10 16:07
When Tkinter was patched to include the new Tk 8.4 stuff
the clipboard_get method was left out.  The attached
diff -c 
file should fix this...

msg47283 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2004-11-10 22:21
Logged In: YES 
user_id=21627

It's too late for 2.4; retargetting for 2.5.
msg47284 - (view) Author: Martin Franklin (mfranklin1) Date: 2004-11-11 13:55
Logged In: YES 
user_id=482545


Thanks Martin I wasn't sure...

I wanted to point out that this method raises a TclError if
it is called when the clipboard is empty... not sure if that
is pythonic or not... perhaps I could catch it and return an
empty string?  Perhaps I should bring this up on the Tkinter
mail list...


msg47285 - (view) Author: Jeff Epler (jepler) Date: 2005-04-12 15:43
Logged In: YES 
user_id=2772

The existing selection_get method also raises TclError,
instead of returning some sentinel value.  clipboard_get
should do the same.

>>> t.selection_get(type="INTEGER")
TclError: PRIMARY selection doesn't exist or form "INTEGER"
not defined

The patch looks obviously correct.  Under light testing, it
worked properly (Python 2.3.5 / Linux),  Recommend "apply".
msg47286 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-16 20:57
Logged In: YES 
user_id=21627

Thanks for the patch, applied as r45461. I agree with jepler
in all points.
History
Date User Action Args
2022-04-11 14:56:08adminsetgithub: 41160
2004-11-10 16:07:26mfranklin1create