Platform independent tool to copy text to clipboard Platform independent tool to copy text to clipboard python python

Platform independent tool to copy text to clipboard


I suppose that you're running on Linux with Gnome.

That's normal behavior on Gnome, as soon as the source of the copy vanishes e.g. closing the Browser Window you copied from, the clipboard data gets removed too. Workaround is to install the gnome-clipboard-daemon which will preserve the Clipboard state like Windows and KDE do.

So, there's not much you can do when running under Gnome, besides leaving your script running.