python添加tab补全功能
2017-10-11 22:30
507 查看
1.code
2.安装第三方库
3.存放位置
4.测试环境
5.使用方法
#!/usr/bin/env/python #_*_coding:utf-8_*_ #Data:17-10-08 #Auther:苏莫 #Link:http://blog.csdn.net/lingluofengzang #PythonVersion:python2.7 #filename:tab.py import sys import readline import rlcompleter import atexit import os reload(sys) sys.setdefaultencoding('utf-8') # tab completion readline.parse_and_bind('tab: complete') # history file # windows histfile = os.path.join(os.environ['HOMEPATH'], '.pythonhistory') # linux # 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
2.安装第三方库
pip install pyreadline
3.存放位置
python安装文档位置下的Lib文件夹
4.测试环境
window
5.使用方法
使用时,脚本需要导入 import tab
相关文章推荐
- Python命令行添加Tab键自动补全功能
- 为python命令行添加Tab键自动补全功能
- CentOS下为python命令行添加Tab键自动补全功能
- python添加tab键自动补全功能
- CentOS下为python命令行添加Tab键自动补全功能
- 为python命令行添加Tab键自动补全功能
- python中的tab补全功能添加
- CentOS下为python命令行添加Tab键自动补全功能
- 为Python添加交互模式下TAB自动补全以及命令历史功能
- 为python命令行添加Tab键自动补全功能
- Python添加tab自动补全及命令历史功能。
- CentOS下为python命令行添加Tab键自动补全功能
- 为python添加tab自动补全功能
- mac版python TAB补全功能
- Python中tab键自动补全功能的配置
- Python-2.7 配置 tab 自动补全功能
- python tab键补全功能
- centos中配置python的tab键自动补全功能
- ubuntu 14.04 添加新用户后无法用tab补全功能
- PyCon 2011 - Hidden Treasures of the Python Standard Library - 为Python命令行添加了按键自动补全内容和命令历史功能