interpreter.py 文件源码

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

项目:purelove 作者: hucmosin 项目源码 文件源码
def setup(self):
        """ Initialization of third-party libraries

        Setting interpreter history.
        Setting appropriate completer function.

        :return:
        """
        if not os.path.exists(self.history_file):
            open(self.history_file, 'a+').close()

        readline.read_history_file(self.history_file)
        readline.set_history_length(self.history_length)
        atexit.register(readline.write_history_file, self.history_file)

        readline.parse_and_bind('set enable-keypad on')

        readline.set_completer(self.complete)
        readline.set_completer_delims(' \t\n;')
        readline.parse_and_bind("tab: complete")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号