用 pyperclip 模块拷贝粘贴字符串
pyperclip 模块不是 Python 自带的。要先安装它
在DOS窗口中只有在Python安装路径中的scripts目录下执行pip才能安装
![](https://img.laitimes.com/img/9ZDMuAjOiMmIsIjOiQnIsIyZuBnLyYTN5AzNzYTMzETMxgTMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.png)
pyperclip 模块有 copy()和 paste()函数
import pyperclip
pyperclip.copy(‘this is a pyperclip test’)
pyperclip.paste()
‘this is a pyperclip test’
用 pyperclip 模块拷贝粘贴字符串
pyperclip 模块不是 Python 自带的。要先安装它
在DOS窗口中只有在Python安装路径中的scripts目录下执行pip才能安装
pyperclip 模块有 copy()和 paste()函数
import pyperclip
pyperclip.copy(‘this is a pyperclip test’)
pyperclip.paste()
‘this is a pyperclip test’