Python 之tab键补全

发布时间:2019-08-26 07:19:02编辑:auto阅读(1696)

    import sys
    import readline
    import rlcompleter
    import atexit
    import os
    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


关键字

上一篇: zabbix3

下一篇: python设计模式