ubuntu python2.7 tab补全

来源:互联网 发布:淘宝开店要不要保证金 编辑:程序博客网 时间:2024/06/12 19:13


accepted

I may have found a way to do it.

Create a file .pythonrc

# ~/.pythonrc# enable syntax completiontry:    import readlineexcept ImportError:    print("Module readline not available.")else:    import rlcompleter    readline.parse_and_bind("tab: complete")

then in your .bashrc file, add

export PYTHONSTARTUP=~/.pythonrc
原创粉丝点击