当前位置:首页 > Python教程 > python技巧

linux下python编辑器的tab补全

                vi tab.py

                #
                !/usr/bin/env python
                
#
                 python startup file
                import
                 sys

                import
                 readline

                import
                 rlcompleter

                import
                 atexit

                import
                 os

                #
                 tab completion
readline.parse_and_bind(tab: complete)
# history file
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

 

原文:http://www.cnblogs.com/abobo/p/8074674.html


【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:254677821)!