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.10.0.tar.gz (12.2 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyperclip-1.10.0.tar.gz
Algorithm Hash digest
SHA256 180c8346b1186921c75dfd14d9048a6b5d46bfc499778811952c6dd6eb1ca6be
MD5 2b29b0e2b8f4b53c034c503bcc2faed0
BLAKE2b-256 159925f4898cf420efb6f45f519de018f4faea5391114a8618b16736ef3029f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyperclip-1.10.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.13.7

File hashes

Hashes for pyperclip-1.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 596fbe55dc59263bff26e61d2afbe10223e2fccb5210c9c96a28d6887cfcc7ec
MD5 26417f88d3fbfb237cc67a24455a5c44
BLAKE2b-256 1ebc22540e73c5f5ae18f02924cd3954a6c9a4aa6b713c841a94c98335d333a1

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