Message239107
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. |
|
Date |
User |
Action |
Args |
2015-03-24 10:47:56 | Victor Korolkevich | set | recipients:
+ Victor Korolkevich |
2015-03-24 10:47:56 | Victor Korolkevich | set | messageid: <1427194076.59.0.225721138053.issue23760@psf.upfronthosting.co.za> |
2015-03-24 10:47:56 | Victor Korolkevich | link | issue23760 messages |
2015-03-24 10:47:56 | Victor Korolkevich | create | |
|