shell.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:touch-pay-client 作者: HackPucBemobi 项目源码 文件源码
def enable_autocomplete_and_history(adir, env):
    try:
        import rlcompleter
        import atexit
        import readline
    except ImportError:
        pass
    else:
        readline.parse_and_bind("tab: complete")
        history_file = os.path.join(adir, '.pythonhistory')
        try:
            readline.read_history_file(history_file)
        except IOError:
            open(history_file, 'a').close()
        atexit.register(readline.write_history_file, history_file)
        readline.set_completer(rlcompleter.Completer(env).complete)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号