python 中TAB空格补全
来源:互联网 发布:情趣用品淘宝店铺简介 编辑:程序博客网 时间:2024/06/03 06:36
直接放到python运行的目录下面,
#pyhton startup file
import sysimport 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
使用方法:
root@kali:~/python# vim tab.py
root@kali:~/python# python
Python 2.7.3 (default, Mar 14 2014, 11:57:14)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tab
>>> import sys
>>> sys. 使用TAB键可以自动查看有关sys.的语句
sys.__class__( sys.api_version sys.hexversion
sys.__delattr__( sys.argv sys.long_info
sys.__dict__ sys.builtin_module_names sys.maxint
sys.__displayhook__( sys.byteorder sys.maxsize
sys.__doc__ sys.call_tracing( sys.maxunicode
sys.__egginsert sys.callstats( sys.meta_path
sys.__excepthook__( sys.copyright sys.modules
sys.__format__( sys.displayhook( sys.path
sys.__getattribute__( sys.dont_write_bytecode sys.path_hooks
sys.__hash__( sys.exc_clear( sys.path_importer_cache
sys.__init__( sys.exc_info( sys.platform
sys.__name__ sys.exc_type sys.prefix
sys.__new__( sys.excepthook( sys.ps1
sys.__package__ sys.exec_prefix sys.ps2
sys.__plen sys.executable sys.py3kwarning
sys.__reduce__( sys.exit( sys.pydebug
sys.__reduce_ex__( sys.exitfunc( sys.setcheckinterval(
sys.__repr__( sys.flags sys.setdlopenflags(
sys.__setattr__( sys.float_info sys.setprofile(
sys.__sizeof__( sys.float_repr_style sys.setrecursionlimit(
sys.__stderr__ sys.getcheckinterval( sys.settrace(
sys.__stdin__ sys.getdefaultencoding( sys.stderr
sys.__stdout__ sys.getdlopenflags( sys.stdin
sys.__str__( sys.getfilesystemencoding( sys.stdout
sys.__subclasshook__( sys.getprofile( sys.subversion
sys._clear_type_cache( sys.getrecursionlimit( sys.version
sys._current_frames( sys.getrefcount( sys.version_info
sys._getframe( sys.getsizeof( sys.warnoptions
sys._mercurial sys.gettrace(
>>> sys.
- python 中TAB空格补全
- python中 tab 键自动补全
- python中使用tab补全
- python tab 补全
- python tab补全
- python tab补全
- python <tab>自动补全
- Python TAB 自动补全
- python <tab>自动补全
- centos python tab 补全
- linux python tab补全
- Python tab补全命令
- python添加tab补全
- Python tab 命令补全,以及 vim 补全
- python Linux Tab自动补全
- python tab键自动补全
- Python命令Tab自动补全脚本
- python的tab自动补全
- 使用Python多线程如何实现生产者消费者模式?
- JavaScript 面向对象之二 —— 函数上下文(this的指向)
- 上传图片
- 算法的时间和空间复杂度的分析
- 深度学习AlexNet模型详细分析
- python 中TAB空格补全
- android java.lang.IllegalArgumentException: column 'id' does not exist 错误
- Java类加载过程
- 迭代回溯 ---8皇后
- C语言简易通讯录
- SwipeRefreshLayout(下拉刷新控件)的使用
- Linux基础学习笔记之硬盘空间计量单位换算与计算机数据计量单位换算区别
- 【剑指offer】连续子数组的最大和
- 扩展欧几里得