[Pythonmac-SIG] readline support for OS X Leopard
Boyd Waters
bwaters at nrao.edu
Wed Oct 31 01:08:14 CET 2007
On Oct 26, 2007, at 7:50 PM, emoy at apple.com wrote:
> It right there in my original message (and in the python man page).
> You have to use EditLine syntax:
>
> readline.parse_and_bind ("bind ^I rl_complete")
Edward's example of using EditLine syntax works for my "raw python"
test:
$ python
>>> import rlcompleter
>>> import readline
>>> readline.parse_and_bind ("bind ^I rl_complete")
>>> readline.[TAB KEY PRESSED]
readline.__class__
readline.__class__ readline.__class__
readline.__delattr__
readline.__delattr__ readline.__dict__
...
BUT
If I change the IPython config file to use EditLine syntax, I get a
segmentation fault when I start ipython.
$ diff .ipython/ipythonrc.0 .ipython/ipythonrc
395c395
< readline_parse_and_bind tab: complete
---
> readline_parse_and_bind bind ^I complete
$ ipython
Segmentation fault
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x000000006a000c6c
Crashed Thread: 0
Thread 0 Crashed:
0 libSystem.B.dylib 0x91f22620 strcmp + 80
1 libedit.2.dylib 0x0044a906 map_bind + 1345
2 libedit.2.dylib 0x0044abec el_parse + 236
3 libedit.2.dylib 0x00457372 rl_parse_and_bind + 85
4 readline.so 0x00440e6a 0x440000 + 3690
5 org.python.python 0x0018d826 PyEval_EvalFrameEx + 17116
6 org.python.python 0x0018da08 PyEval_EvalFrameEx + 17598
7 org.python.python 0x0018da08 PyEval_EvalFrameEx + 17598
8 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638
9 org.python.python 0x0018daa5 PyEval_EvalFrameEx + 17755
10 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638
11 org.python.python 0x00139c47 PyFunction_SetClosure +
2646
12 org.python.python 0x0011fd5d PyObject_Call + 50
13 org.python.python 0x00128618 PyMethod_New + 2457
14 org.python.python 0x0011fd5d PyObject_Call + 50
15 org.python.python 0x00188b35
PyEval_CallObjectWithKeywords + 211
16 org.python.python 0x0012484d PyInstance_New + 305
17 org.python.python 0x0011fd5d PyObject_Call + 50
18 org.python.python 0x0018db3a PyEval_EvalFrameEx + 17904
19 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638
20 org.python.python 0x0018daa5 PyEval_EvalFrameEx + 17755
21 org.python.python 0x0018f47b PyEval_EvalCodeEx + 1638
22 org.python.python 0x0018f568 PyEval_EvalCode + 87
23 org.python.python 0x001a6a0c PyErr_Display + 1896
24 org.python.python 0x001a7036 PyRun_FileExFlags + 135
25 org.python.python 0x001a89a2 PyRun_SimpleFileExFlags
+ 421
26 org.python.python 0x001b3c23 Py_Main + 3095
27 org.python.pythonapp 0x00001fca 0x1000 + 4042
More information about the Pythonmac-SIG
mailing list