python 剪切板复制粘贴


 
安装
pip3.7 install pyperclip
code
import pyperclip
pyperclip.copy('hello world')
print(pyperclip.paste())
 
output
Python 3.7.4 (v3.7.4:e09359112e, Jul  8 2019, 14:54:52)
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyperclip
>>> pyperclip.copy('hello world')
>>> print(pyperclip.paste())
hello world
>>>

 

 
 
 
参考:
 
 
 
 
 
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM