小编vah*_*dan的帖子

如何在python解释器shell中重复最后一个命令?

如何重复上一个命令?通常的键:Up,Ctrl + Up,Alt-p不起作用.他们产生荒谬的人物.

(ve)[kakarukeys@localhost 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
>>> 
Run Code Online (Sandbox Code Playgroud)

python shell interpreter virtualenv python-idle

122
推荐指数
8
解决办法
15万
查看次数

标签 统计

interpreter ×1

python ×1

python-idle ×1

shell ×1

virtualenv ×1