Issue 1063914: Tkinter clipboard_get method (new in Tk 8.4) (original) (raw)

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:08 admin set github: 41160
2004-11-10 16:07:26 mfranklin1 create