def write_history_file(self, filename=None):
        if filename is None:
            filename=self.history_filename
        fp = open(filename, 'wb')
        for line in self.history[-self.history_length:]:
            fp.write(ensure_str(line.get_line_text()))
            fp.write('\n')
        fp.close()
Save a readline history file.
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/site-packages/pyreadline/lineeditor/history.py/LineHistory.write_history_file