def osx_clipboard_get():
 p = subprocess.Popen(['pbpaste', '-Prefer', 'ascii'], stdout=subprocess.PIPE)
 (text, stderr) = p.communicate()
 text = text.replace('\r', '\n')
 text = py3compat.cast_unicode(text, py3compat.DEFAULT_ENCODING)
 return text

def osx_clipboard_get ( ) : p = subprocess . Popen ( [ 'pbpaste' , '-Prefer' , 'ascii' ] , stdout = subprocess . PIPE ) ( text , stderr ) = p . communicate ( ) text = text . replace ( '\r' , '\n' ) text = py3compat . cast_unicode ( text , py3compat . DEFAULT_ENCODING ) return text
get the clipboards text on os x .