码迷,mamicode.com
首页 > 编程语言 > 详细

python安装readline模块 实现自动补全

时间:2014-09-29 18:00:31      阅读:2166      评论:0      收藏:0      [点我收藏+]

标签:python

yum安装readline、readline-devel

#yum install -y readline-devel

下载安装setuptools

#wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e --no-check-certificate

#tar -zxvf setuptools-0.6c11.tar.gz

#cd setuptools-0.6c11

#python setup.py install


下载安装readline

#wget https://pypi.python.org/packages/source/r/readline/readline-6.2.4.1.tar.gz#md5=578237939c81fdbc2c8334d168b17907 --no-check-certificate

#tar -zxvf readline-6.2.4.1.tar.gz

#cd readline-6.2.4.1

#python setup.py install


# python

Python 2.7.5 (default, Sep 27 2014, 17:30:23)

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> import readline, rlcompleter; readline.parse_and_bind("tab: complete")


这样就把python自动补全的功能安装完毕


本文出自 “Jeff” 博客,请务必保留此出处http://zhangxz.blog.51cto.com/5490116/1559297

python安装readline模块 实现自动补全

标签:python

原文地址:http://zhangxz.blog.51cto.com/5490116/1559297

(0)
(2)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!