I'm kind of a newbie in python. I want to create a program that when you copy something to your clipboard, It 'prints' it on the 'app'. It works, but the issue is that every two seconds it displays what you may have copied 2 hours ago. I want it to be that when the clipboard is the same, it only shows one time and then it waits until you have copied something else. This is what i have so far
import pyperclip
from tkinter import *
r = Tk()
def aper():
global x
x = pyperclip.waitForPaste()
Label(r, text = x).pack()
r.after(2000, aper)
r.after(2000, aper)
r.mainloop()
Thank you!