当前位置:首页 > 操作系统 > MacOs

可以将python发送到Mac剪贴板

我希望我的python程序在Mac剪贴板中放置一些文本.

这可能吗?

解决方法:

新答案:

This page建议:

Implementation for All Mac OS X
Versions

The other Mac module
(MacSharedClipboard.py, in Listing 4)
implements the clipboard interface on
top of two command-line programs
called pbcopy (which copies text into
the clipboard) and pbpaste (which
pastes whatever text is in the
clipboard). The prefix “pb” stands for
“pasteboard,” the Mac term for
clipboard.

老答案:

显然是这样的:

http://code.activestate.com/recipes/410615/

是一个简单的脚本,演示如何做到这一点.

编辑:刚刚意识到这依赖于Carbon,所以可能并不理想……取决于你使用它的一点点.


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!

相关教程推荐

其他课程推荐