##// END OF EJS Templates
let add_history take strings for pyreadline <= 1.5
MinRK -
Show More
@@ -24,6 +24,18 b' except ImportError:'
24 except ImportError:
24 except ImportError:
25 have_readline = False
25 have_readline = False
26
26
27 if have_readline and hasattr(_rl, 'rlmain'):
28 # patch add_history to allow for strings in pyreadline <= 1.5:
29 # fix copied from pyreadline 1.6
30 import pyreadline
31 if pyreadline.release.version <= '1.5':
32 def add_history(line):
33 """add a line to the history buffer."""
34 from pyreadline import lineobj
35 if not isinstance(line, lineobj.TextLine):
36 line = lineobj.TextLine(line)
37 return _rl.add_history(line)
38
27 if sys.platform == 'win32' and have_readline:
39 if sys.platform == 'win32' and have_readline:
28 try:
40 try:
29 _outputfile=_rl.GetOutputFile()
41 _outputfile=_rl.GetOutputFile()
General Comments 0
You need to be logged in to leave comments. Login now