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