Garbled lines and backspace keys in Python-5.8 Interactive Mode in CentOS 2.7.5

Source: Internet
Author: User

Garbled lines and backspace keys in Python-5.8 Interactive Mode in CentOS 2.7.5

In CentOS 5.8 (x86_64), direction keys and backspace keys in Python-2.7.5 interactive mode are garbled.

After upgrading Python in CentOS to version 2.7.5, it is found that Python keys are garbled in interactive mode. It is found that the readline module is missing from the system. By default, only the readline module is installed in CentOS 5.8, but the readline-devel module is not installed.

# Install readline-devel
$ Yum install readline-devl
# Reinstall python
$./Configure
$ Sudo make install

This problem should have been solved. If the problem persists, try using the readline module that comes with Python:

# Configure
$./Configure
# Switch to the Modules directory and modify the Setup file
$ Cd Modules
$ Vi Setup
# Cancel # readline. c-lreadline-ltermcap line annotator
# Then reinstall python
$ Make install

-------------------------------------- Split line --------------------------------------

Install Python3.4 on CentOS source code

Python core programming version 2. (Wesley J. Chun). [Chinese version of hd pdf]

Python development technology details. (Zhou Wei, Zong Jie). [hd PDF scan version + book guide video + code]

Obtain Linux information using a Python script

Build a desktop algorithm transaction research environment using Python in Ubuntu

A Brief History of Python Development

Python details: click here
Python: click here

This article permanently updates the link address:

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.