Mercurial > python-cmd2
comparison cmd2.py @ 24:f9196cf5ef51
gonna mess with tempfiles
author | catherine@localhost |
---|---|
date | Fri, 16 May 2008 17:36:28 -0400 |
parents | 37bff80ef816 |
children | 6948d1f9e4b4 |
comparison
equal
deleted
inserted
replaced
23:37bff80ef816 | 24:f9196cf5ef51 |
---|---|
145 def pasteBufferProcess(self, mode='read'): | 145 def pasteBufferProcess(self, mode='read'): |
146 if mode == 'read': | 146 if mode == 'read': |
147 command = 'xclip -o -sel clip' | 147 command = 'xclip -o -sel clip' |
148 else: | 148 else: |
149 command = 'xclip -sel clip' | 149 command = 'xclip -sel clip' |
150 return subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE) | 150 result = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stdin=subprocess.PIPE) |
151 #TODO: need a better response to user who lacks xclip | |
152 return result | |
151 | 153 |
152 def onecmd(self, line): | 154 def onecmd(self, line): |
153 """Interpret the argument as though it had been typed in response | 155 """Interpret the argument as though it had been typed in response |
154 to the prompt. | 156 to the prompt. |
155 | 157 |