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