clip-util-0.1.9
توضیحات
Clipboard utilities for use with Python.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | Microsoft :: Windows |
| نام فایل | clip-util-0.1.9 |
| نام | clip-util |
| نسخه کتابخانه | 0.1.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Kyle L. Davis |
| ایمیل نویسنده | AceofSpades5757.github@gmail.com |
| آدرس صفحه اصلی | https://github.com/AceofSpades5757/clip-util |
| آدرس اینترنتی | https://pypi.org/project/clip-util/ |
| مجوز | MIT |
[](https://github.com/pre-commit/pre-commit)
[](https://github.com/psf/black)
[](https://pypi.org/project/clip-util/)
[](https://pypi.org/project/clip-util/)
[](https://github.com/AceofSpades5757/clip-util/blob/main/LICENSE)
[](https://github.com/AceofSpades5757/clip-util/actions/workflows/test.yml)
[](https://clip-util.readthedocs.io/en/latest/)
# 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
- RTF
# Usage
## Clipboard
Will open and close every time the values are set, or retrieved. It's better to use a context manager.
```python
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')
```
<!--
# HTML
clipboard['html'] = '<h1>Hello World</h1>'
-->
### Context Manager
```python
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')
```
<!--
# HTML
clipboard['html'] = '<h1>Hello World</h1>'
-->
## See Clipboard Formats
`ClipboardFormats`
: Enum for clipboard formats.
`ClipboardFormats.CF_HTML`
: Represents HTML format.
`ClipboardFormats.CF_RTF`
: Represents RTF format.
```python
from clipboard import Clipboard
from clipboard import ClipboardFormats
from clipboard import HTMLClipboard
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9 | Python |
نحوه نصب
نصب پکیج whl clip-util-0.1.9:
pip install clip-util-0.1.9.whl
نصب پکیج tar.gz clip-util-0.1.9:
pip install clip-util-0.1.9.tar.gz