##// END OF EJS Templates
more general fix for #662...
MinRK -
Show More
@@ -217,16 +217,12 b' def ipexec(fname, options=None):'
217 full_cmd = '%s %s %s' % (ipython_cmd, cmdargs, full_fname)
217 full_cmd = '%s %s %s' % (ipython_cmd, cmdargs, full_fname)
218 #print >> sys.stderr, 'FULL CMD:', full_cmd # dbg
218 #print >> sys.stderr, 'FULL CMD:', full_cmd # dbg
219 out = getoutputerror(full_cmd)
219 out = getoutputerror(full_cmd)
220 # `import readline` causes 'ESC[?1034h' to be the first output sometimes,
220 # `import readline` causes 'ESC[?1034h' to be output sometimes,
221 # so strip that off the front of the first line if it is found
221 # so strip that out before doing comparisons
222 if out:
222 if out:
223 first = out[0]
223 out,err = out
224 m = re.match(r'\x1b\[[^h]+h', first)
224 out = re.sub(r'\x1b\[[^h]+h', '', out)
225 if m:
225 out = out,err
226 # strip initial readline escape
227 out = list(out)
228 out[0] = first[len(m.group()):]
229 out = tuple(out)
230 return out
226 return out
231
227
232
228
General Comments 0
You need to be logged in to leave comments. Login now