首页 > 编程语言 > 详细

Python建立Tab自动补全的脚本

时间:2017-05-01 19:38:56      阅读:256      评论:0      收藏:0      [点我收藏+]

Python建立Tab自动补全的脚本

 1 #!/usr/bin/python
 2 #python steup file
 3 import sys
 4 import readline
 5 import rlcompleter
 6 import atexit
 7 import os
 8 # tab completion
 9 readline.parse_and_bind(tab: complete)
10 #history file
11 histfile = os.path.join(os.environ[HOME], .pythonhistory)
12 try:
13         readline.read_history_file(histfile)
14 except IOError:
15         pass
16 atexit.register(readline.write_history_file, histfile)
17 
18 del os, histfile, readline, rlcompleter

 

Python建立Tab自动补全的脚本

原文:http://www.cnblogs.com/fallenmoon/p/6792510.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!