rlcompleter2.py 文件源码

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

项目:pyshell 作者: oglops 项目源码 文件源码
def setup(histfn=None, button='tab',verbose=1):
    if histfn is None: 
        base = os.getenv('HOME')
        if not base: 
            import tempfile
            base = tempfile.gettempdir()
        histfn = os.path.join(base, '.pythonhist')
    import readline 
    completer = Completer()
    readline.set_completer_delims('')
    readline.set_completer(completer.rl_complete)
    readline.parse_and_bind(button+': complete')
    if histfn:
        setup_readline_history(histfn)
    if verbose:
        print ("Welcome to rlcompleter2 %s" % __version__)
        print ("for nice experiences hit <%s> multiple times"%(button))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号