python支持Tab键的设置说明:
先确定是否有安装readline和rlcompleter模块,默认linux自带的python版本会安装好了。
root@ubuntu:/home/kerwin/python# python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>>
测试下是否有安装readline和rlcompleter模块
root@ubuntu:/home/kerwin/python# python
Python 2.7.5+ (default, Feb 27 2014, 19:37:08)
[GCC 4.8.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>>
>>>
>>> import readline
>>> import rlcompleter
>>>
import没有报错,说明已安装。
之后执行readline.parse_and_bind('tab:complete') 打开Tab补全功能。
测试输入requests.点Tab会出现相关requests的方法,测试打开Tab补全成功。
>>> r=requests.
requests.ConnectionError( requests.Timeout( requests.__dict__ requests.__name__ requests.__sizeof__( requests.certs requests.hooks requests.session(
requests.HTTPError( requests.TooManyRedirects( requests.__doc__ requests.__new__( requests.__str__( requests.codes requests.logging requests.sessions
requests.NullHandler( requests.URLRequired( requests.__file__ requests.__package__ requests.__subclasshook__( requests.compat requests.models requests.status_codes
requests.PreparedRequest( requests.__author__ requests.__format__( requests.__path__ requests.__title__ requests.cookies requests.options( requests.structures
requests.Request( requests.__build__ requests.__getattribute__( requests.__reduce__( requests.__version__ requests.delete( requests.patch( requests.utils
requests.RequestException( requests.__class__( requests.__hash__( requests.__reduce_ex__( requests.adapters requests.exceptions requests.post(
requests.Response( requests.__copyright__ requests.__init__( requests.__repr__( requests.api requests.get( requests.put(
requests.Session( requests.__delattr__( requests.__license__ requests.__setattr__( requests.auth requests.head( requests.request(
阅读(877) | 评论(0) | 转发(0) |