Cross-platform clipboard utilities supporting both binary and text data.
Project description
pyperclip3
Cross-platform clipboard utilities supporting both binary and text data.
Installation
Requires python 3.7+
pip install pyperclip3
Usage
pyperclip3 can be used in Python code
import pyperclip3
pyperclip3.copy("hello clipboard") # copy data to the clipboard
cb_data = pyperclip3.paste() # retrieve clipboard contents
print(cb_data)
pyperclip3.clear() # clears the clipboard contents
assert not pyperclip3.paste()
Or a CLI
# paste clipboard contents to stdout
python -m pyperclip3 paste
# load contents to the clipboard from stdin
python -m pyperclip3 copy < myfile.text
# same as above, but pipe from another command
some-program | python -m pyperclip3 copy
Status
This library will implement functionality for several platforms and clipboard utilities.
- MacOS (via
pbcopy
/pbpaste
) - Windows (coming soon)
- Linux (xclip - coming soon)
- Linux (xsel - coming soon)
If there is a platform or utility not currently listed, please request it by creating an issue.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyperclip3-0.1.0.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for pyperclip3-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b9dfe15503f3c0b08fc46c1ee34734fc5d7cd7636b9249c5fa38468d70e480 |
|
MD5 | 5e3c854ec326aa9a72b2d47caa1f0248 |
|
BLAKE2b-256 | bc4fd17c0bd44ff56c2a1ce874961d6c0028a09a2df2a690eb01254cfc0f35fa |