Created
August 27, 2016 08:54
-
-
Save fengxuway/5f4122e732af57de07e7150c8a60e54a to your computer and use it in GitHub Desktop.
python读取OSX剪贴板
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
def getClipboardData(): | |
p = subprocess.Popen(['pbpaste'], stdout=subprocess.PIPE) | |
retcode = p.wait() | |
data = p.stdout.read() | |
return data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
文字能读成功,图片读不到