Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to copy any text using python

from tkinter import Tk

def Copy(txt):
    r = Tk()
    r.withdraw()
    r.clipboard_clear()
    r.clipboard_append(str(txt))
    r.update() # now it stays on the clipboard after the window is closed
    r.destroy()
Copy("It Works")
 
PREVIOUS NEXT
Tagged: #How #copy #text #python
ADD COMMENT
Topic
Name
8+7 =