linux下python编辑器的tab补全

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接: https://blog.csdn.net/weixin_45625815/article/details/102731744

vi tab.py
#!/usr/bin/env python
#python startup file
import sys
import readline
import rlcompleter
import atexit
import os
#tab completion
readline.parse_and_bind(‘tab: complete’)
history file
histfile = os.path.join(os.environ[‘HOME’], ‘.pythonhistory’)
try:
readline.read_history_file(histfile)
except IOError:
pass
atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter

获取Python教程,开发工具技术交流分享,欢迎加入871458817

猜你喜欢

转载自blog.csdn.net/weixin_45625815/article/details/102731744
今日推荐