配置python命令tab键自动补全
2014-02-12 18:00
666 查看
1. 下载readline模块 http://newcenturycomputers.net/projects/readline.html 2. install readlinemodule
3. edit and configure pythonstartup file
# 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
4. add the enviroment varable to system with administrator role
For windowns
pythonstartupf=path/pythonstartup.py
For Linux
add the following to you
3. edit and configure pythonstartup file
# 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
4. add the enviroment varable to system with administrator role
For windowns
pythonstartupf=path/pythonstartup.py
For Linux
add the following to you
~/.bash_profile
export PYTHONSTARTUP=~/.pythonstartupWork for fun,Live for love!
相关文章推荐
- 配置python命令tab键自动补全
- 配置python命令tab键自动补全
- linux下配置python命令tab键自动补全
- 配置python命令tab键自动补全
- 配置python命令tab键自动补全
- 配置python命令tab键自动补全
- 配置python命令tab键自动补全
- Python实现Tab自动补全和历史命令管理的方法
- python环境下使用tab自动补全命令
- Python命令tab键自动补全
- Python命令Tab自动补全脚本
- python环境tab命令自动补全
- python环境下使用tab自动补全命令
- python学习笔记--导入tab键自动补全功能的配置
- Python添加tab自动补全及命令历史功能。
- 配置python tab键自动补全
- 为Python添加交互模式下TAB自动补全以及命令历史功能
- python Tab自动补全命令设置
- Python命令还使用tab键自动补全和xshell不能使用删除键
- Python-2.7 配置 tab 自动补全功能