I'm looking for some code to append a string to the clipboard and get the text from the clipboard ues Python3 and tkinter. And I find this question. So I tried these codes:
from tkinter import Tk
r = Tk()
r.withdraw()
r.clipboard_clear()
r.clipboard_append('i can has clipboardz?')
r.destroy()
They're cleared my clipboard, but didn't append anything.
By the way, I tried print(r.clipboard_get())
.
It's working out-of-the-box. But I can't append any text to the clipboard.