windows下使用python2.7,控制台下无法无法自动补齐
参照http://stackoverflow.com/questions/6024952/readline-functionality-on-windows-with-python-2-7
1. 安装pyreadline
pip install pyreadline
2.启用tab键自动补齐
try:
import readline
except ImportError:
import pyreadline as readline
import rlcompleter
readline.parse_and_bind('tab: complete')
3.python启动自动启用自动补齐
将2.中代码保存到pythonrc.py, 并设置python.exe运行时加载pythonrc.py
set PYTHONSTARTUP=pythonrc.py