Python add tab support and install Redis

Source: Internet
Author: User
Tags install redis

Add Tab support

    1. Tab content:

Vim tab.py

#! /usr/bin/python

Import Sys

Import ReadLine

Import Rlcompleter

Import OS

Readline.parse_and_bind (' Tab:complete ')

Histfile = Os.path.join (os.environ[' HOME '), '. Pythonhistory ')


2. View Python traversal path


>>> Import Sys

>>> Sys.path

[' ', '/usr/local/pyhon2.7/lib/python2.7/site-packages/setuptools-18.4-py2.7.egg ', '/usr/local/pyhon2.7/lib/ Python2.7/site-packages/readline-6.2.4.1-py2.7-linux-x86_64.egg ', '/usr/local/pyhon2.7/lib/python2.7/ Site-packages/mysql_python-1.2.3-py2.7-linux-x86_64.egg ', '/usr/local/pyhon2.7/lib/python2.7/site-packages/ Paramiko-1.16.0-py2.7.egg ', '/usr/local/pyhon2.7/lib/python2.7/site-packages/ecdsa-0.13-py2.7.egg ', '/usr/local/ Pyhon2.7/lib/python2.7/site-packages/redis-2.10.5-py2.7.egg ', '/usr/local/pyhon2.7/lib/python27.zip ', '/usr/ local/pyhon2.7/lib/python2.7 ', '/usr/local/pyhon2.7/lib/python2.7/plat-linux2 ', '/usr/local/pyhon2.7/lib/ Python2.7/lib-tk ', '/usr/local/pyhon2.7/lib/python2.7/lib-old ', '/usr/local/pyhon2.7/lib/python2.7/lib-dynload ', '/usr/local/pyhon2.7/lib/python2.7/site-packages ']


3. Add the file to the Traverse path

MV Tab.py/usr/local/pyhon2.7/lib/python2.7/site-packages/


Installing Redis

Download Path: https://github.com/andymccurdy/redis-py

Unzip Redis-py-master.zip

CD Redis-py-master

Python setup.py Install

This article is from the "OPS rookie" blog, please be sure to keep this source http://ckl893.blog.51cto.com/8827818/1745506

Python add tab support and install Redis

Related Article

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.