readline
問題:
(.env) [root@cd tmp]# python
Python 2.7.10 (default, Jul 4 2017, 17:45:34)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time^[[D^[[D^[[D
File "<stdin>", line 1
import time
^
SyntaxError: invalid syntax
>>> ^[[A^[[A^[[A^[[B^[[B
File "<stdin>", line 1
^
SyntaxError: invalid syntax
>>>
無法回退闽烙,無法上翻霍衫,下翻....
安裝 readline
(.env) [root@cd tmp]# pip install readline
安裝 readline 之后:
(.env) [root@cd tmp]# python
Python 2.7.10 (default, Jul 4 2017, 17:45:34)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> import time