##// END OF EJS Templates
Fix readline detection bug in OSX....
Fernando Perez -
Show More
@@ -35,7 +35,19 b" if sys.platform == 'win32' and have_readline:"
35 uses_libedit = False
35 uses_libedit = False
36 if sys.platform == 'darwin' and have_readline:
36 if sys.platform == 'darwin' and have_readline:
37 import commands
37 import commands
38 (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ )
38 # Boyd's patch had a 'while True' here, I'm always a little worried about
39 # infinite loops with such code, so for now I'm taking a more conservative
40 # approach. See https://bugs.launchpad.net/ipython/+bug/411599.
41 for i in range(10):
42 try:
43 (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ )
44 break
45 except IOError, (errno, strerror):
46 if errno == 4:
47 continue
48 else
49 break
50
39 if status == 0 and len(result) > 0:
51 if status == 0 and len(result) > 0:
40 # we are bound to libedit - new in Leopard
52 # we are bound to libedit - new in Leopard
41 _rl.parse_and_bind("bind ^I rl_complete")
53 _rl.parse_and_bind("bind ^I rl_complete")
General Comments 0
You need to be logged in to leave comments. Login now