Skip to main content

Multi-format, cross-platform clipboard library

Project description

jaraco.clipboard

https://img.shields.io/pypi/v/jaraco.clipboard.svg https://img.shields.io/pypi/pyversions/jaraco.clipboard.svg https://img.shields.io/pypi/dm/jaraco.clipboard.svg https://img.shields.io/travis/jaraco/jaraco.clipboard/master.svg

The only clipboard library for Python that supports text on all three major platforms plus HTML on MacOS and HTML and images on Windows.

Similar to pyperclip and clipboard and xerox except attempts to support more formats than just text.

This library is just a thin wrapper around the best platform implementations:

  • pyperclip for Linux

  • richxerox for MacOS

  • jaraco.windows for Windows

Usage

jaraco.clipboard supplies several functions in the clipboard module. The most common are the copy and paste functions:

from jaraco import clipboard
clipboard.copy('some text')
clipboard.paste() == 'some text'

Other functions include copy/paste html and image.

If not implemented on your platform, the functions will raise NotImplementedError.

Supported by

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