1 vim tab.py
2 #!/usr/bin/env python 3 # 4 #Tab 5 import sys 6 import readline 7 import rlcompleter 8 import atexit 9 import os 10 readline.parse_and_bind('tab:complete') 11 #history file 12 histfile = os.path.join(os.environ['HOME'],'.pythonhistory') 13 try: 14 readline.read_history_file(histfile) 15 except IOError: 16 pass 17 atexit.register(readline.write_history_file,histfile) 18 del os,histfile,readline,rlcompleter
python tab自动补全