Utilities for use with Python.
Project description
Description
Package for accessing the clipboard with Python.
Installation
pip install clip-util
Features
Windows Only
Allows for text and HTML on Windows.
Supported Clipboard Formats
- Text
- HTML
Usage
Clipboard
Will open and close every time the values are set, or retrieved. It's better to use a context manager.
from clipboard import Clipboard
clipboard = Clipboard()
# Set Clipboard
clipboard['text'] = 'Hello World!'
# OR
clipboard.set_clipboard('text') = 'Hello World!'
# Get Clipboard
text = clipboard['text']
# OR
text = clipboard.get_clipboard('text')
Context Manager
from clipboard import Clipboard
with Clipboard() as clipboard:
# Set Clipboard
clipboard['text'] = 'Hello World!'
# OR
clipboard.set_clipboard('text') = 'Hello World!'
# Get Clipboard
text = clipboard['text']
# OR
text = clipboard.get_clipboard('text')
See Clipboard Formats
ClipboardFormats
: Enum for clipboard formats.
ClipboardFormats.CF_HTML
: Represents HTML format.
from clipboard import Clipboard
from clipboard import ClipboardFormats
from clipboard import HTMLClipboard
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
clip-util-0.1.5.tar.gz
(8.1 kB
view hashes)
Built Distribution
Close
Hashes for clip_util-0.1.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aab9bfdc438f4bd5b5777a76e492e5d51d67569f5531e941a4fd11ad50c48d99 |
|
MD5 | 6b3262e50a7a3a7b9f80beccd8dcd1df |
|
BLAKE2b-256 | 455392742461d4376722161d6ba878b79af8e73ebe1ed7f117107db1cbc7059e |