[New-bugs-announce] [issue23760] Tkinter in Python 3.4 on Windows don't post internal clipboard data to the Windows clipboard on exit

Victor Korolkevich report at bugs.python.org
Tue Mar 24 11:47:56 CET 2015


New submission from Victor Korolkevich:

>From http://stackoverflow.com/questions/26321333/tkinter-in-python-3-4-on-windows-dont-post-internal-clipboard-data-to-the-windo

I use the following code to place result in clipboard.

from tkinter import Tk
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append("Result")

It works fine on Python version 3.3.5 and earlier. But in Python 3.4 it was receive empty clipboard. If I prevent the script from the immediate exit, adding input() after clipboard_append(), I see that clipboard contains the correct "Result".

If I run script, switch to any other window and press Ctrl+V, I receive "Result" and "Result" remains in clipboard after script exits.

I think in tcl/tk 8.6 clipboard_clear() affect system clipboard, but clipboard_append affect only internal tcl/tk clipboard that transfered to system clipboard only by OS request. Looks like it was done in Linux, that don't have system clipboard.

----------
components: Tkinter
messages: 239107
nosy: Victor Korolkevich
priority: normal
severity: normal
status: open
title: Tkinter in Python 3.4 on Windows don't post internal clipboard data to the Windows clipboard on exit
type: behavior
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23760>
_______________________________________


More information about the New-bugs-announce mailing list