Use the Custom tab instance, under the Python command line cannot use the tab to fill the feeling is very uncomfortable has, has looked for the Online tab instance the method, basically all similar.
Reference: Http://askubuntu.com/questions/25605/how-can-i-get-tab-completion-in-the-interactive-python-interpreter
This method is pro-test effective, but involves changing the environment variable what the feeling is a bit troublesome, directly into the module to import more convenient
1. Find the Lib path of Python
# cd/usr/lib/python2.7/site-packages
2,vim tab.py Copy the code in the link is good:
#! /usr/bin/env pythontry:import readlineexcept importerror:print ("Module readline not available.") Else:import rlcompleter readline.parse_and_bind ("Tab:complete")
Look at the effect:
$ Pythonpython 2.7.5 (default, Nov, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on Linux2type "help", "Copyri Ght "," credits "or" license "for more information.>>> import tab>>> s= ' abc ' >>> SS SetAttr (sorted (str (Slice (Staticmethod (SUM (&G T;>>
Any user can use the Import tab directly.
This article is from the "Always on the Road" blog, please be sure to keep this source http://chenql.blog.51cto.com/8732050/1908978
Python Command line tab instance small coup