Python script to copy text to clipboard [duplicate]
See Pyperclip. Example (taken from Pyperclip site): import pyperclip pyperclip.copy(‘The text to be copied to the clipboard.’) spam = pyperclip.paste() Also, see Xerox. But it appears to have more dependencies.