【发布时间】:2023-03-26 05:31:01
【问题描述】:
我想在我的 Mac 上安装一个 64 位的 Python 解释器,所以我必须从源代码重新构建。但是,使用我自己的自定义构建解释器时,当我在 shell 中运行解释器时尝试导航时会遇到问题。在 bash shell 中输入 python 会产生熟悉的结果:
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 的默认解释器中不会发生。
这是什么原因造成的?我该如何解决?
【问题讨论】:
标签: python shell navigation