這個問題真的困擾了我很長一段時間,我無法一直弄清楚答案。爲什麼有時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