1.tab功能脚本

[root@localhost python]# cat tab.py

#!/usr/bin/python 

import sys 

import readline 

import rlcompleter 

import os 

# tab completion 

readline.parse_and_bind('tab: complete') 

# history file 

histfile = os.path.join(os.environ['HOME'], '.pythonhistory') 

2.导入

在脚本当前目录下,执行python,然后import

import tab