##// END OF EJS Templates
STY: rlineimpl review from @fperez...
MinRK -
Show More
@@ -26,7 +26,7 b" if sys.platform == 'darwin':"
26 try:
26 try:
27 dynload_idx = sys.path.index(lib_dynload)
27 dynload_idx = sys.path.index(lib_dynload)
28 except ValueError:
28 except ValueError:
29 dynload_idx = -1
29 dynload_idx = None
30 else:
30 else:
31 sys.path.pop(dynload_idx)
31 sys.path.pop(dynload_idx)
32 try:
32 try:
@@ -43,7 +43,7 b' except ImportError:'
43
43
44 if sys.platform == 'darwin':
44 if sys.platform == 'darwin':
45 # dirty trick, part II:
45 # dirty trick, part II:
46 if dynload_idx != -1:
46 if dynload_idx is not None:
47 # restore path
47 # restore path
48 sys.path.insert(dynload_idx, lib_dynload)
48 sys.path.insert(dynload_idx, lib_dynload)
49 if not have_readline:
49 if not have_readline:
@@ -83,6 +83,7 b" if sys.platform == 'win32' and have_readline:"
83 # Test to see if libedit is being used instead of GNU readline.
83 # Test to see if libedit is being used instead of GNU readline.
84 # Thanks to Boyd Waters for the original patch.
84 # Thanks to Boyd Waters for the original patch.
85 uses_libedit = False
85 uses_libedit = False
86
86 if have_readline:
87 if have_readline:
87 # Official Python docs state that 'libedit' is in the docstring for libedit readline:
88 # Official Python docs state that 'libedit' is in the docstring for libedit readline:
88 uses_libedit = 'libedit' in _rl.__doc__
89 uses_libedit = 'libedit' in _rl.__doc__
@@ -91,6 +92,7 b' if have_readline:'
91 # known culprits of this include: EPD, Fink
92 # known culprits of this include: EPD, Fink
92 # There is not much we can do to detect this, until we find a specific failure
93 # There is not much we can do to detect this, until we find a specific failure
93 # case, rather than relying on the readline module to self-identify as broken.
94 # case, rather than relying on the readline module to self-identify as broken.
95
94 if uses_libedit and sys.platform == 'darwin':
96 if uses_libedit and sys.platform == 'darwin':
95 _rl.parse_and_bind("bind ^I rl_complete")
97 _rl.parse_and_bind("bind ^I rl_complete")
96 warnings.warn('\n'.join(['', "*"*78,
98 warnings.warn('\n'.join(['', "*"*78,
General Comments 0
You need to be logged in to leave comments. Login now