unbtun python tab补全
2 Linux w 4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
2 Python 2.7.10 (default, Oct 14 2015, 16:09:02)
3 [GCC 5.2.1 20151010] on linux2
4 Type "help", "copyright", "credits" or "license" for more information.
5 >>> import sys
6 >>> sys.path
7 ['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']
2 # python startup file
3 import sys
4 import readline
5 import rlcompleter
6 import atexit
7 import os
8 # tab completion
9 readline.parse_and_bind('tab: complete')
10 # history file
11 histfile = os.path.join(os.environ['HOME'], '.pythonhistory')
12 try:
13 readline.read_history_file(histfile)
14 except IOError:
15 pass
16 atexit.register(readline.write_history_file, histfile)
17 del os, histfile, readline, rlcompleter
2 #!/usr/bin/python
3 # python startup file
4 import sys
5 import readline
6 import rlcompleter
7 import atexit
8 import os
9 # tab completion
10 readline.parse_and_bind('tab: complete')
11 # history file
12 histfile = os.path.join(os.environ['HOME'], '.pythonhistory')
13 try:
14 readline.read_history_file(histfile)
15 except IOError:
16 pass
17 atexit.register(readline.write_history_file, histfile)
18 del os, histfile, readline, rlcompleter
2 #for python
3 export PYTHONSTARTUP=/usr/lib/python2.7/dist-packages/tab.py
4 #上面的路径和文件名必须和上面的保持一致。
5 w@w:~$ source .bashrc #启用上面的环境
转载于:https://www.cnblogs.com/wulaoer/p/5032301.html
unbtun python tab补全相关推荐
- centos7 python tab补全
centos7 python tab补全 1.编写tab.py [vagrant@node100 ~]$ cat tab.py #!/usr/bin/python # python startup f ...
- python tab补全
看视频发现讲课的老师python可以tab补全,网上找了一段代码 如下: [root@node01 data]#vi tab.py 1 #!/usr/bin/env python 2 # python ...
- linux python tab补全_python交互模式下实现tab自动补全功能
建立.pythonstartup文件 $ cat .pythonstartup # cat ~/.pythonstartup # python startup file #!/usr/bin/env ...
- Python tab 补全
1. 先准备一个tab.py的脚本 shell> cat tab.py 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 #!/usr/bin/py ...
- python学习------tab补全
python学习------tab补全 python也可以进行tab键补全 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 #!/usr/bin/env ...
- python代码命令行tab补齐_Python语言交互模式下命令tab补全
本文主要向大家介绍了Python语言交互模式下命令tab补全,通过具体的内容向大家展示,希望对大家学习Python语言有所帮助. python默认就可以进行tab补全命令行,在交互模式下,只要自己写个 ...
- MySQL(1)数据库介绍,配置MySQL的tab补全
文章目录 一.数据库的基本概念 1.1 使用数据库的必要性 1.2 数据库的概念 1.2.1 数据(Data) 1.2.2 表 1.2.3 数据库 1.2.4 数据库管理系统(DBMS) 1.2.5 ...
- Python 之vim编写python自动补全
Pydiction :vim - python自动补全插件 插件的安装如下: 1.下载插件包 https://github.com/vim-scripts/Pydiction 可以直接下载,也可git ...
- python自动补全库_叼炸天的库! 自动补全 Python 代码,能节省 60% 敲码时间
近日,Reddit 上的一篇帖子引起了网友的热议.帖子作者「mlvpj」称: 「我们使用深度学习完成了一个简单的项目,可以自动进行 Python 代码补全.」 根据介绍,该项目基于 LSTM 模型,训 ...
- python自动补全库_这个库厉害了,自动补全Python代码,节省50%敲码时间
近日,Reddit 上的一篇帖子引起了网友的热议.帖子作者「mlvpj」称: 「我们使用深度学习完成了一个简单的项目,可以自动进行 Python 代码补全.」 根据介绍,该项目基于 LSTM 模型,训 ...
最新文章
- java使用ireport生成报表_JasperReport(3)——Java简单使用IReport生成的文件建立报表...
- Android selector 使用
- Hibernate 中配置属性详解(hibernate.properties)
- 为什么C++(感谢waterwalk翻译)
- 10853k1_领导学基础_21秋考试
- 计算机专业英语词汇mp3,【听单词】计算机专业英语词汇音频106,计算机英语单词MP3...
- LuaForUnity6:Lua模块
- 解决从github下载项目速度过慢
- 【Swing 3】布局管理器与简单的聊天界面
- 交叉验证(Cross Validation)简介
- Hexo-Next主题配置
- 黑客郭盛华虚假新闻_每日新闻摘要:黑客闯入十个电信网络
- pandas shift函数的用法
- 6章7街构造函数和解析函数
- css选择器权重排序_css选择器的权重计算
- 微信小程序搜索wifi列表
- Python中条件判读语句if的使用详解
- 手摸手教你搭建免费图床
- 移动端购物车数据重新编译后数据消失
- 使用 BOL API 创建 SAP CRM IBASE 数据