def _load_history(self):
"""Load history file and register dump on exit."""
# Create a file without truncating it in case it exists.
open(config.history_path, 'a').close()
readline.set_history_length(100)
try:
readline.read_history_file(config.history_path)
except IOError:
pass
atexit.register(readline.write_history_file,
config.history_path)
评论列表
文章目录