-1
I’m doing a job and need the value of a variable to go to the Clipboard so I can use it at another time.
You can do this in Python v2.7?
-1
I’m doing a job and need the value of a variable to go to the Clipboard so I can use it at another time.
You can do this in Python v2.7?
3
You can use that ready lib, like the:
Supports Windows, Mac and Linux (Linux requires gtk or Pyqt4)
Installing via PIP the pyperclip
:
pip install pyperclip
Example of use:
import pyperclip
variavel = "Python"
pyperclip.copy(variavel)
Note: internally the https://pypi.org/project/clipboard/ uses pyperclip, so I removed from the answer, there is no advantage in its use, the only reason the author created the lib was to have a "better name" (maybe he does not know how the
import
works)
Browser other questions tagged python python-2.7 clipboard
You are not signed in. Login or sign up in order to post.