Skip to main content

Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.

Project description

Pyperclip is a cross-platform Python module for copy and paste clipboard functions. It works with Python 2 and 3.

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 gtk or PyQt4 modules installed.

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.5.2.zip (13.5 kB view details)

Uploaded Source

File details

Details for the file pyperclip-1.5.2.zip.

File metadata

  • Download URL: pyperclip-1.5.2.zip
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyperclip-1.5.2.zip
Algorithm Hash digest
SHA256 69294f6739b64e2526569233b2382af13664e8b2c7263daf8140ebc81ef5b894
MD5 5b02eac2e6ce38d04a9c2283c2cdc98f
BLAKE2b-256 9beae90cdacb8028bd941883f17a7610c1a63702d317687ab28cce84b92fae61

See more details on using hashes here.

Provenance

Supported by

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