我想在我的Mac上使用64位python解释器,所以我不得不从源代码重建。但是,使用我自己的自定义构建解释器时,当我从shell内部运行解释器时尝试导航时会遇到问题。将python键入bash shell会产生熟悉的结果:
Python 2.6.3 (r263:75183, Oct 23 2009, 14:23:25)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
但是,当我尝试使用左箭头和右箭头导航时,我会得到奇怪的字符:
Python 2.6.3 (r263:75183, Oct 23 2009, 14:23:25)
[GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> ^[[A^[[A^[[A^[[D^[[C^[[C^[[A^[[B^[[D^[[C
这在Apple的默认解释器中不会发生。
造成这种情况的原因是什么?我该如何解决?