Tcl/Tk clipboard under Windows

David Ascher da at ski.org
Wed May 26 14:42:15 EDT 1999


On Wed, 26 May 1999, Michael S. Schliephake wrote:

> Has anyone remarked the following problem and possibly a solution?
> 
> (Win-NT 4, W98 - Python 1.5.2, Tk 8.05)
> If you copy some text from a Tkinter-prog to the clipboard and the
> program is finished immediately, one cannot paste the clipboard content
> into another programm. If you paste before finishing the Python-program,
> the clipboard content is how intended and remains there.
> 
> The problem seems to be in the Tcl/Tk implementation because Tcl/Tk
> standalone behaves in the same way. Has anyone enough knowledge of the
> Tk-implementation to help with a correction?

I haven't noticed it.  I use the following code to do the copy -- is this
what you're doing?

    Tkinter._default_root.clipboard_clear()
    Tkinter._default_root.clipboard_append(errmsg)

--david ascher






More information about the Python-list mailing list