
Security News
libxml2 Maintainer Ends Embargoed Vulnerability Reports, Citing Unsustainable Burden
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Cross-platform clipboard utilities supporting both binary and text data.
Some key features include:
Requires python 3.7+
pip install pyclip
pyclip can be used in Python code
import pyclip
pyclip.copy("hello clipboard") # copy data to the clipboard
cb_data = pyclip.paste() # retrieve clipboard contents
print(cb_data) # b'hello clipboard'
cb_text = pyclip.paste(text=True) # paste as text
print(cb_text) # 'hello clipboard'
pyclip.clear() # clears the clipboard contents
assert not pyclip.paste()
Or a CLI
# paste clipboard contents to stdout
python -m pyclip paste
# load contents to the clipboard from stdin
python -m pyclip copy < myfile.text
# same as above, but pipe from another command
some-program | python -m pyclip copy
Installing via pip also provides the console script pyclip
:
pyclip copy < my_file.txt
This library implements functionality for several platforms and clipboard utilities.
xclip
)wl-clipboard
)If there is a platform or utility not currently listed, please request it by creating an issue.
pywin32
package is installed as a requirement.MacOS has support for multiple backends. By default, the pasteboard
package is used.
pbcopy
/pbpaste
can also be used as a backend, but does not support arbitrary binary data, which may lead to
data being lost on copy/paste. This backend may be removed in a future release.
Linux on X11 requires xclip
to work. Install with your package manager, e.g. sudo apt install xclip
Linux on Wayland requires wl-clipboard
to work. Install with your package manager, e.g. sudo apt install wl-clipboard
Big thanks to Howard Mao for donating the PyClip project name on PyPI to this project.
FAQs
Cross-platform clipboard utilities supporting both binary and text data.
We found that pyclip demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Libxml2’s solo maintainer drops embargoed security fixes, highlighting the burden on unpaid volunteers who keep critical open source software secure.
Research
Security News
Socket investigates hidden protestware in npm packages that blocks user interaction and plays the Ukrainian anthem for Russian-language visitors.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.