diff options
author | catherine <catherine@localhost> | 2008-05-19 10:08:23 -0400 |
---|---|---|
committer | catherine <catherine@localhost> | 2008-05-19 10:08:23 -0400 |
commit | 0ed75b4909ef07ee87344d700b565667bc7e8c2a (patch) | |
tree | bbd58831d95961a85a09cd693b023869907ab3b7 /cmd2.py | |
parent | 0a5b7a4e8415e5de351891d8c6d07e42b4013e10 (diff) | |
download | cmd2-hg-0.3.1.tar.gz |
fixed err in python 2.4 xclip detectionv0.3.1
Diffstat (limited to 'cmd2.py')
-rwxr-xr-x | cmd2.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -101,8 +101,11 @@ else: can_clip = True
except AttributeError: # check_call not defined, Python < 2.5
teststring = 'Testing for presence of xclip.'
- xclipproc = subprocess.check_call('xclip -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
+ #import pdb; pdb.set_trace()
+ xclipproc = subprocess.Popen('xclip -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
xclipproc.stdin.write(teststring)
+ xclipproc.stdin.close()
+ xclipproc = subprocess.Popen('xclip -o -sel clip', shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE)
if xclipproc.stdout.read() == teststring:
can_clip = True
except (subprocess.CalledProcessError, OSError):
|