Pyperclip module in Python
Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with both Python 2 and 3. This module was created to enable cross-platform copy-pasting in Python which was earlier absent. The
pyperclip module has
paste() functions that can send text to and receive text from your computer’s clipboard. Sending the output of your program to the clipboard will make it easy to paste it on an email, word processor, or some other software.
pip install pyperclip
To copy text to the clipboard, pass a string to
pyperclip.copy(). To paste the text from the clipboard, call
pyperclip.paste() and the text will be returned as a string value.
Note : Copy function will convert every data type to string.