首页 > 编程语言 > 详细

Python在Linux系统下的tab补齐

时间:2015-01-13 17:54:44      阅读:308      评论:0      收藏:0      [点我收藏+]

#!/usr/bin/env python
   #_*_coding:utf-8 _*_
  import sys
  import os
  import readline
  import rlcompleter

 import atexit
 readline.parse_and_bind(‘tab:complete‘)
 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


本文出自 “执念” 博客,请务必保留此出处http://zcl1101017794.blog.51cto.com/7962179/1603576

Python在Linux系统下的tab补齐

原文:http://zcl1101017794.blog.51cto.com/7962179/1603576

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