vi tab.py

#!/usr/bin/env python 
# python startup file 
import sys
import readline
import rlcompleter
import atexit
import os
# tab completion 
r
readline.parse_and_bind('tab: complete')
# history file 
h
histfile = os.path.join(os.environ['HOME'], '.pythonhistory')
try:
    readline.read_history_file(histfile)
except IOError:
    pass
a
atexit.register(readline.write_history_file, histfile)
del os, histfile, readline, rlcompleter

>>> import sys

>>> sys.path

['', '/usr/local/python2.7/lib/python27.zip', '/usr/local/python2.7/lib/python2.7', '/usr/local/python2.7/lib/python2.7/plat-linux2', '/usr/local/python2.7/lib/python2.7/lib-tk', '/usr/local/python2.7/lib/python2.7/lib-old', '/usr/local/python2.7/lib/python2.7/lib-dynload', '/usr/local/python2.7/lib/python2.7/site-packages']


/usr/local/python2.7/lib/python2.7/site-packages  保存到此目录下