GTK+ 3.0 Clipboard doesn't paste anything to my clipboard
<p>I've been using this script for testing.</p>

<pre><code>import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk
board = Gtk.Clipboard.get(Gdk.SELECTION_CLIPBOARD)
board.set_text("hello there", -1)
board.store()
</code></pre>

<p>It does erase anything I have in my clipboard, but it doesn't add "hello there". It just leaves empty my clipboard. It seems like other people who have used this script say that it works, so I'm not really sure about what could be causing this.</p>

<p><a href="https://andrewsteele.me.uk/learngtk.org/tutorials/python_gtk3_tutorial/html/clipboard.html" rel="nofollow">I've used this as my resource.</a></p>

<p>Edit: This also happens to me with tkinter, so I believe that it might not be exclusive to GTK. It's probably client-side.</p>

<p>Tkinter code I've used to test:</p>

<pre><code>from tkinter import Tk
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append('i can has clipboardz?')
r.destroy()
</code></pre>

<p>I got it working, sort of. It seems like I've been able to import the <a href="https://pypi.python.org/pypi/xerox" rel="nofollow">xerox library</a> without GTK complaining, and it worked. It's still not the best solution, but at least it's a workarround.</p>

python tkinter gtk