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代码自动补全
时间: 2024-11-19 01:40:53