A cross-platform clipboard module for Python. (Only handles plain text for now.)
Project description
Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.
Install on Windows: pip install pyperclip
Install on Linux/macOS: pip3 install pyperclip
Al Sweigart al@inventwithpython.com BSD License
Example Usage
>>> import pyperclip >>> pyperclip.copy('The text to be copied to the clipboard.') >>> pyperclip.paste() 'The text to be copied to the clipboard.'
Currently only handles plaintext.
On Windows, no additional modules are needed.
On Mac, this module makes use of the pbcopy and pbpaste commands, which should come with the os.
On Linux, this module makes use of the xclip or xsel commands, which should come with the os. Otherwise run “sudo apt-get install xclip” or “sudo apt-get install xsel” (Note: xsel does not always seem to work.)
Otherwise on Linux, you will need the qtpy or PyQT5 modules installed.
Support
If you find this project helpful and would like to support its development, [consider donating to its creator on Patreon](https://www.patreon.com/AlSweigart).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyperclip-1.9.0.tar.gz
.
File metadata
- Download URL: pyperclip-1.9.0.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7de0142ddc81bfc5c7507eea19da920b92252b548b96186caf94a5e2527d310 |
|
MD5 | 43f9e69bf948139055683d28080787f4 |
|
BLAKE2b-256 | 30232f0a3efc4d6a32f3b63cdff36cd398d9701d26cda58e3ab97ac79fb5e60d |