跨平台复制粘贴文本,二进制数据,实现自动化操作

liuyuqi-dellpc 61aecd3345 0 5 months ago
README.md 6fc88c6738 Update 'README.md' 8 months ago
main.py 61aecd3345 0 5 months ago
requirements.txt 61aecd3345 0 5 months ago

README.md

pyperclip

跨平台复制粘贴文本,二进制数据,实现自动化操作

Usage

pip install pyperclip

import pyperclip

# 复制文本到剪贴板
pyperclip.copy('The text to be copied to the clipboard.')

# 从剪贴板粘贴文本
pasted_text = pyperclip.paste()
print(pasted_text)  # 输出:'The text to be copied to the clipboard.'