天天看点

pyperclip模块

用 pyperclip 模块拷贝粘贴字符串

pyperclip 模块不是 Python 自带的。要先安装它

在DOS窗口中只有在Python安装路径中的scripts目录下执行pip才能安装

pyperclip模块

pyperclip 模块有 copy()和 paste()函数

import pyperclip

pyperclip.copy(‘this is a pyperclip test’)

pyperclip.paste()

‘this is a pyperclip test’