[Patches] [ python-Patches-1063914 ] Tkinter clipboard_get method (new in Tk 8.4)

SourceForge.net noreply at sourceforge.net
Sun Apr 16 22:57:24 CEST 2006


Patches item #1063914, was opened at 2004-11-10 17:07
Message generated for change (Settings changed) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1063914&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Tkinter
Group: Python 2.5
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Martin Franklin (mfranklin1)
Assigned to: Martin v. Löwis (loewis)
Summary: Tkinter clipboard_get method (new in Tk 8.4)

Initial Comment:
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...



----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2006-04-16 22:57

Message:
Logged In: YES 
user_id=21627

Thanks for the patch, applied as r45461. I agree with jepler
in all points.

----------------------------------------------------------------------

Comment By: Jeff Epler (jepler)
Date: 2005-04-12 17:43

Message:
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".

----------------------------------------------------------------------

Comment By: Martin Franklin (mfranklin1)
Date: 2004-11-11 14:55

Message:
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...




----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-11-10 23:21

Message:
Logged In: YES 
user_id=21627

It's too late for 2.4; retargetting for 2.5.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1063914&group_id=5470


More information about the Patches mailing list