How to copy to clipboard? Python
chimildic (0)

I want to copy some text to clipboard, bot gives error:
Pyperclip could not find a copy/paste mechanism for your system.

Code:

import pyperclip
pyperclip.copy(my_string)

For example,
https://repl.it/@david74/clipboard
https://repl.it/@avinashbasutkar/Copying-and-Pasting-Strings-with-the-Pyperclip-Module

Both with error

You are viewing a single comment. View All
ash15khng (393)

The thing is because repl.it works online and runs the code on their servers, when it tries to find a copy paste mechanism it will look on the server and not your computer. This is kind of a limitation with repl.it sadly.