[issue40452] IDLE: preserve clipboard on closure

Tal Einat report at bugs.python.org
Tue May 19 02:44:39 EDT 2020


Tal Einat <taleinat+python at gmail.com> added the comment:

Looking into this further, this seems to be an issue in tkinter rather than with tcl/tk. Running `wish a.tcl` with the following simple script does leave its text in the clipboard:

pack [text .t]
.t insert 1.0 "Test text"
clipboard clear
clipboard append -- [.t get 1.0 end]
exit

On the other hand, the following equivalent Python script leaves the clipboard empty:

import tkinter
text = tkinter.Text()
text.pack()
text.clipboard_clear()
text.clipboard_append("Testing again")

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40452>
_______________________________________


More information about the Python-bugs-list mailing list