Show More
@@ -6,7 +6,7 Requires Python 2.3 or newer. | |||
|
6 | 6 | |
|
7 | 7 | This file contains all the classes and helper functions specific to IPython. |
|
8 | 8 | |
|
9 |
$Id: iplib.py 284 |
|
|
9 | $Id: iplib.py 2854 2007-11-01 20:19:34Z bgranger $ | |
|
10 | 10 | """ |
|
11 | 11 | |
|
12 | 12 | #***************************************************************************** |
@@ -1321,11 +1321,15 want to merge them back into the new files.""" % locals() | |||
|
1321 | 1321 |
|
|
1322 | 1322 | |
|
1323 | 1323 |
|
|
1324 | # Or if libedit is used, load editrc. | |
|
1324 | 1325 |
|
|
1325 | 1326 |
|
|
1326 | 1327 |
|
|
1327 | 1328 |
|
|
1328 | inputrc_name = os.path.join(home_dir,'.inputrc') | |
|
1329 | inputrc_name = '.inputrc' | |
|
1330 | if readline.uses_libedit: | |
|
1331 | inputrc_name = '.editrc' | |
|
1332 | inputrc_name = os.path.join(home_dir, inputrc_name) | |
|
1329 | 1333 |
|
|
1330 | 1334 | try: |
|
1331 | 1335 |
|
@@ -1340,6 +1344,10 want to merge them back into the new files.""" % locals() | |||
|
1340 | 1344 |
|
|
1341 | 1345 | |
|
1342 | 1346 |
|
|
1347 | # This is only done if GNU readline is being used. If libedit | |
|
1348 | # is being used (as on Leopard) the readline config is | |
|
1349 | # not run as the syntax for libedit is different. | |
|
1350 | if not readline.uses_libedit: | |
|
1343 | 1351 |
|
|
1344 | 1352 |
|
|
1345 | 1353 |
@@ -29,6 +29,19 if sys.platform == 'win32' and have_readline: | |||
|
29 | 29 | print "Failed GetOutputFile" |
|
30 | 30 | have_readline = False |
|
31 | 31 | |
|
32 | # Test to see if libedit is being used instead of GNU readline. | |
|
33 | # Thanks to Boyd Waters for this patch. | |
|
34 | uses_libedit = False | |
|
35 | if sys.platform == 'darwin' and have_readline: | |
|
36 | import commands | |
|
37 | (status, result) = commands.getstatusoutput( "otool -L %s | grep libedit" % _rl.__file__ ) | |
|
38 | if status == 0 and len(result) > 0: | |
|
39 | # we are bound to libedit - new in Leopard | |
|
40 | _rl.parse_and_bind("bind ^I rl_complete") | |
|
41 | print "Leopard libedit detected." | |
|
42 | uses_libedit = True | |
|
43 | ||
|
44 | ||
|
32 | 45 | # the clear_history() function was only introduced in Python 2.4 and is |
|
33 | 46 | # actually optional in the readline API, so we must explicitly check for its |
|
34 | 47 | # existence. Some known platforms actually don't have it. This thread: |
@@ -1,3 +1,8 | |||
|
1 | 2007-11-01 Brian Granger <ellisonbg@gmail.com> | |
|
2 | ||
|
3 | * iplib.py, rlineimpl.py: Applied Body Water's patches to get IPython | |
|
4 | working with OS X 10.5 libedit implementation of readline. | |
|
5 | ||
|
1 | 6 | 2007-10-24 Ville Vainio <vivainio@gmail.com> |
|
2 | 7 | |
|
3 | 8 | * iplib.py(user_setup): To route around buggy installations where |
General Comments 0
You need to be logged in to leave comments.
Login now