Skip to main content

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.

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

pyperclip-1.11.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyperclip-1.11.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pyperclip-1.11.0.tar.gz.

File metadata

  • Download URL: pyperclip-1.11.0.tar.gz
  • Upload date:
  • Size: 12.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyperclip-1.11.0.tar.gz
Algorithm Hash digest
SHA256 244035963e4428530d9e3a6101a1ef97209c6825edab1567beac148ccc1db1b6
MD5 18a82fd043eb34ce47efe1f03835844d
BLAKE2b-256 e852d87eba7cb129b81563019d1679026e7a112ef76855d6159d24754dbd2a51

See more details on using hashes here.

File details

Details for the file pyperclip-1.11.0-py3-none-any.whl.

File metadata

  • Download URL: pyperclip-1.11.0-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for pyperclip-1.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273
MD5 a1d550024d901e4adec89453c657b4aa
BLAKE2b-256 df80fc9d01d5ed37ba4c42ca2b55b4339ae6e200b456be3a1aaddf4a9fa99b8c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page