/usr/lib/python2.7/dist-packages/pymol/xwin.py is in pymol 1.8.4.0+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | import os
def machine_get_clipboard():
result = []
from popen2 import popen2
wish_path = os.environ['PYMOL_PATH']+"/ext/bin/wish8.0" # dubious...
if not os.path.exists(wish_path):
wish_path = "/usr/bin/wish"
if os.path.exists(wish_path):
pipe = popen2(wish_path)
pipe[1].write("puts [ selection get ]\n")
pipe[1].write("exit\n")
pipe[1].close()
while 1:
l=pipe[0].readline()
if not l: break
result.append(l)
return result
|