Terry J. Reedy <tjre...@udel.edu> added the comment:

I ran your tkinter code on Windows, without IDLE, and the clipboard was clear 
thereafter.  I added 'test.mainloop()' and observed the following.
1. Close immediately, clipboard is clear, as before.
2. Paste 'Testing again' into 'text' with ^V and close, and clipboard is still 
clear.
3. Paste elsewhere (here, Command Prompt, or IDLE), close, and 'Testing again' 
can be pasted anywhere.

4. When I run from an IDLE editor, paste into the editor (which in running in 
the IDLE process rather than the user process where the test code is running, 
and close, 'Testing again' remains on the clipboard.

It appears that either a. tkinter clear the clipboard unless pasted into 
another process, or b. tkinter (or tk) always clears the clipboard on exit and 
it is gone unless pulled out of the process first by pasting elsewhere.  The 
best option is for this to be fixed.

The example codes are not quite equivalent.  Tkinter clipboard_clear and 
_append call self.tk.call with the equivalent arguments *plus*, 
  self._options({'displayof':text._w}) == ('-displayof', '.!text')
However, commenting out the addition had no visible effect.

----------
components: +Tkinter
stage: patch review -> needs patch
title: IDLE: preserve clipboard on closure -> Tkinter/IDLE: preserve clipboard 
on closure

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40452>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to