这个问题真的困扰了我很长一段时间,我无法一直弄清楚答案。为什么有时python解释器无法识别向上箭头键?
我有我的Ubuntu的各种版本的Python。某些版本的python解释器可以通过 正常识别键盘箭头键。但有些版本不能。
例如。在我的python2.6解释器中,所有键盘按键都可以正确读取。 但在我python2.7解释,如果我输入“向上箭头键”我的键盘上,解释器将证明这一点,我要的是重新出现>>> test = "hello world"
:
(python2.7)[email protected]:~$ python
Python 2.7.3 (default, Mar 19 2013, 19:57:37)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> test = "hello world"
>>> ^[[A