34fw 发表于 2015-1-14 08:55:39

Python在Linux系统下的tab补齐

#!/usr/bin/env python
   #_*_coding:utf-8 _*_
import sys
import os
import readline
import rlcompleter
import atexit
readline.parse_and_bind('tab:complete')
histfile=os.path.join(os.environ['HOME'],'.pythonhistory')
try:
    readline.read_history_file(histfile)
except IOError:
    pass
atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter


页: [1]
查看完整版本: Python在Linux系统下的tab补齐