Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近升级到 Ubuntu 10.04 LTS 并刷新了我的 Python 环境。我从源代码安装了 Python 2.7。不幸的是,我没有注意到 Setup.dist 默认注释掉了 readline 行——默认情况下,没有安装 readline 支持。我现在将 Python 解释器用作 REPL,以至于常量 ^[[A 和 ^[[D 非常令人讨厌。
我可以快速添加 readline 支持,还是我必须再次重新编译 Python?似乎应该有一种快速,理智的方法来做到这一点,但我不知道这种方法。
有一个独立的gnureadline 包可用,您可以使用 setuptools 安装它
$ easy_install readline
您也可以考虑改用ipython。