Unix下实现如题功能用下面的代码:
import rlcompleter, readline readline.parse_and_bind(‘tab: complete‘)
但readline不能在win中用,需要为windows编译好的pyreadline
pip install pyreadline import rlcompleter, pyreadline a=Readline() a.parse_and_bind(‘tab: complete‘)
windows下Python shell代码自动补全,布布扣,bubuko.com
原文:http://www.cnblogs.com/ffan/p/3891899.html