平台无关的python复制粘贴库
copypaste的Python项目详细描述
平台无关的python复制粘贴库 我认为,这个库比xerox更简单、更强大。
支持:
- 苹果操作系统(PBcopy+PBPaste)
- Linux(必需xclip)
- 窗口(必需pywin32或IronPython)
安装
pip install copypaste
用法
>>> from copypaste import copy, paste >>> >>> copy('I\'m here to make web a better place!!') >>> paste() "I'm here to make web a better place!!" >>> >>> # Only for UNIX like systems you can specify your own command for copy and paste >>> copy('I\'m here to make web a better place!!', cmd=['xsel', '-pi']) >>> paste(cmd=['xsel', '-o']) "I'm here to make web a better place!!" >>>
命令行用法
% copy "I'm here to make web a better place!!" % paste I'm here to make web a better place!! % % echo I\'m here to make web a better place!! | copy % paste I'm here to make web a better place!! %
许可证
copypestate是根据mit许可证授权的。有关详细信息,请参见许可文件。