Python tab 补全
2015-06-05 00:00
627 查看
摘要: Python tab 补全
#!/usr/bin/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
#!/usr/bin/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列表和元组
- Python 脚本传参
- Python time模块
- Python文件倒读,主要用于日志分析
- Python装饰器有趣实例探究
- Django1.8+Python3.4环境搭建填坑整合
- python学习笔记
- 基于python的新浪微博模拟登陆
- python中关闭文件
- python文本编辑器Sublime text
- Python笔记——01模块安装方法
- Python图像处理(7):利用轮廓分块处理
- Python面试题集答案(1)
- 使用Python扫描端口
- 使用Python扫描端口情况
- Python 代码调试技巧
- [笔记]python的StringIO与BytesIO模块
- [Python] 机器学习库资料汇总
- Python 视频文件的分割和合并
- [Python] 学习资料汇总