首页 > 代码库 > windows下Python shell代码自动补全

windows下Python shell代码自动补全

Unix下实现如题功能用下面的代码:

import rlcompleter, readlinereadline.parse_and_bind(tab: complete)

 

但readline不能在win中用,需要为windows编译好的pyreadline

pip install pyreadlineimport rlcompleter, pyreadlinea=Readline()a.parse_and_bind(tab: complete)