在python终端中导航

dzh*_*lil 0 python navigation shell

我想在我的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.
>>> 
Run Code Online (Sandbox Code Playgroud)

但是,当我尝试使用左箭头和右箭头导航时,我会得到奇怪的字符:

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
Run Code Online (Sandbox Code Playgroud)

这在Apple的默认解释器中不会发生.

是什么造成的?我该如何解决?

Mer*_*let 6

听起来您的自定义构建不包括readline.应该是一个简单的配置更改和重建,请在此处查看更多信息.