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

天问 6fc88c6738 Update 'README.md' 3 weeks ago
README.md 6fc88c6738 Update 'README.md' 3 weeks 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.'