>>> import sys
>>> sys.path
[‘‘, ‘/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg‘, ‘/usr/lib64/python26.zip‘,
‘/usr/lib64/python2.6‘, ‘/usr/lib64/python2.6/plat-linux2‘, ‘/usr/lib64/python2.6/lib-tk‘,
‘/usr/lib64/python2.6/lib-old‘, ‘/usr/lib64/python2.6/lib-dynload‘, ‘/usr/lib64/python2.6/site-packages‘,
‘/usr/lib/python2.6/site-packages‘]
第一个为空,代表着先到当前目录下去查找
tab.py就放到上面的目录下
#!/usr/bin/env python
#coding=utf-8
import sys
import readline
import rlcompleter
import atexit
import os
# tab completion
readline.parse_and_bind(‘tab: complete‘)
放到/usr/lib/python2.6/site-packages目录下
import tab
import os
os.
(tab键就可以使用了)
时间: 2024-10-09 08:33:07