与pyclip中python fork的剪贴板轻松交互
pyclip-copycat的Python项目详细描述
#来自https://github.com/zhemao/pyclip的pyclip复制分叉
pyclip在linux上包装xclip命令行程序和pbcopy pbpasteMac OS X上的程序,以及Windows上的剪辑和粘贴程序,为 系统剪贴板。要安装库,请下载代码并运行 sudo python setup.py安装。然后您可以像这样使用库
import clipboard
# copy some text to the clipboard clipboard.copy(‘blah blah blah’)
# get the text currently held in the clipboard text = clipboard.paste()
# helpful wrapper that passes pasted text through the csv module # useful for dealing with data copied from spreadsheets data = clipboard.paste_table()
注意:如果您在Linux上使用它,请确保您拥有xclip 程序已安装。
pyclip是在麻省理工学院许可下发布的,在许可证中复制。