DEV Community

Tommi k Vincent
Tommi k Vincent

Posted on

Copying and Pasting Strings with pyperclip Module in Python.

Pyperclip :is a cross-platform Python module for copying and pasting clipboard functions in python.
Pyperclip module has copy() and paste() functions that can send text to and receive text from your Computer's clipboard.
To use pyperclip run on your terminal pip3 install pyperclip to install locally on machine then run pthon3 to open the interactive shell to execute the below code.


>>> import pyperclip
>>> pyperclip.copy('Vincent tommi!')
>>> pyperclip.paste()
'Vincent tommi!'
>>> 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)