def init_readline(self):
"Initialize the readline functionality to enable console history."
if self.hub_history_file is not None:
readline.set_history_length(self.hub_history_length)
try:
readline.read_history_file(self.hub_history_file)
except IOError:
pass
atexit.register(readline.write_history_file, self.hub_history_file)
评论列表
文章目录