Windows Python installation ReadLine module for automatic completion

Source: Internet
Author: User

Two versions of python2.7 and python3.5 installed

python2.7 first install the download ReadLine:

Py-2-m pip install Pyreadline

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/89/18/wKiom1gHNcWAuAjFAADb1cogOfY708.png-wh_500x0-wm_3 -wmp_4-s_1638979911.png "title=" 1.png "alt=" Wkiom1ghncwauajfaadb1cogofy708.png-wh_50 "/>

Generate two directories in the Python27\lib\site-packages directory after completion

Pyreadline

Pyreadline-2.1-py2.7.egg-info


This makes it possible to use the ReadLine module.


python3.5 installation Download

Download the Pyreadline-2.1.zip, use the Python3 setup.py install

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/15/wKioL1gHN6WAKw8iAABKPTAb2Jo596.png-wh_500x0-wm_3 -wmp_4-s_229513524.png "title=" 2.png "alt=" Wkiol1ghn6wakw8iaabkptab2jo596.png-wh_50 "/>


Generated under the Python3.5\lib\site-packages directory

Pyreadline Directory

Pyreadline-2.1-py3.5.egg-info file

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/89/18/wKiom1gHNs3DF3KRAADrEEZmFNs926.png-wh_500x0-wm_3 -wmp_4-s_72360679.png "title=" 2.png "alt=" Wkiom1ghns3df3kraadreezmfns926.png-wh_50 "/>


Switch to the Python directory, my system is E:\Program files\python\python27

Edit tab.py Script

Import ReadLine
Import Rlcompleter
Import OS
# tab Completion
Readline.parse_and_bind (' Tab:complete ')
# History File
Histfile = Os.path.join (os.environ[' HOME '), '. Pythonhistory ')


This article is from "Operation and maintenance record Mei Ling" blog, please be sure to keep this source http://meiling.blog.51cto.com/6220221/1863539

Windows Python installation ReadLine module for automatic completion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.