Python: copying from clipboard using tkinter without displaying window
This works fine except a blank tkinter window pops up every time this executes.
You can hide this window:
from tkinter import Tk
root = Tk()
root.withdraw()
number = root.clipboard_get()
Window is created by tkinter.Tk()
(or other elements which need window) not by tk().mainloop()
. Mainloop keeps program working.
Maybe try Pyperclip or clipboard