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