我如何重複上一個命令?常用的鍵:向上,Ctrl +向上,Alt-p不起作用。它們產生無意義的特徵。如何在python解釋器shell中重複上次的命令?
(ve)[[email protected] ve]$ python
Python 2.6.6 (r266:84292, Nov 15 2010, 21:48:32)
[GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> print "hello world"
hello world
>>> ^[[A
File "<stdin>", line 1
^
SyntaxError: invalid syntax
>>> ^[[1;5A
File "<stdin>", line 1
[1;5A
^
SyntaxError: invalid syntax
>>> ^[p
File "<stdin>", line 1
p
^
SyntaxError: invalid syntax
>>>
向上箭頭正常工作對我來說(Ubuntu的),它的怪異。 – 2010-11-27 03:11:24
同上,箭頭在Windows上適用於我。你使用的是什麼shell,以及什麼操作系統的終端程序? – fmark 2010-11-27 03:12:40
我在Fedora 13上安裝了一個單獨的python 2.6.6安裝,運行virtualenv,使用默認的python shell,在gnome-terminal – kakarukeys 2010-11-27 03:15:58